Boot Options¶
Added in version 2.0.3.
PME supports an external startup config file named boot_config.json.
It is read before addon registration begins.
Note
Developer boot options take effect on the next Blender startup. Resource path edits apply immediately after a successful save.
Where to edit it¶
You can edit these options in Preferences > Settings > Developer.
Tip
Use Open Boot Config Folder to open the folder that contains boot_config.json.
OS |
PME 2.1 Extension |
|---|---|
Windows |
|
macOS |
|
Linux |
|
The Extension and Legacy addon use separate config files. The Legacy addon file is
boot_config.json directly inside the same pie_menu_editor directory. Normally,
use Open Boot Config Folder instead of entering the path manually.
This file is not overwritten by addon updates and is stored separately from user resources.
Resource path fields¶
Added in version 2.2.0: Multiple resource folders and the backup and log locations are managed in boot_config.json.
Normally, edit these settings in Settings > Resources. Use the following fields when editing the file directly.
Field |
Value and purpose |
|---|---|
|
An array containing at least one folder. Array order controls the order in the list and Quick Locations. |
Each folder’s |
A nonempty, unique string used as a display name. It is not a script namespace. |
Each folder’s |
A nonempty string containing a folder path. All registered folders are used. |
|
An array of icon folders. Each item’s |
|
A nonempty string containing the menu backup path. Backups do not include script or icon files. |
|
A nonempty string containing the diagnostic log path. |
Backup and log paths are independent. They do not follow changes to resource folder names, paths, or registration order. See File Locations for the fixed subfolder layout and file discovery rules.
The following is only the resource settings portion of the file. Add or update these fields in your existing boot_config.json, keeping its other fields; do not replace the entire file with this example.
{
"resources": {
"folders": [
{"name": "Pie Menu Editor", "path": "/Users/example/Documents/Pie Menu Editor"},
{"name": "Studio", "path": "../Shared/PME"}
],
"icons": [
{"path": "/Users/example/Documents/Pie Menu Editor/icons"},
{"path": "../Shared/PME/icons"}
]
},
"backup": {
"directory": "/Users/example/Documents/Pie Menu Editor/backups"
},
"logs": {
"directory": "/Users/example/Documents/Pie Menu Editor/logs"
}
}
Relative paths¶
Folder and icon folder path values, backup.directory, and logs.directory accept absolute or relative paths. Relative values use
os.path.dirname(bpy.app.binary_path) as their base: the directory containing the running
Blender executable. The .blend file, current working directory, and boot config directory
are not used as the base. On macOS, this base can be inside the Blender application bundle.
The folder chooser’s Go to Relative Path Base button opens the actual base.
The raw string is saved as entered; PME resolves it when using the location without replacing
it with an absolute value. Home-directory and environment-variable expressions are expanded
at resolution time. // follows the host OS’s absolute/UNC path rules, not Blender’s
.blend-relative convention. Windows drive-relative paths such as C:resources are rejected;
use a full absolute path or a path relative to the Blender executable directory.
A missing folder can remain configured. Reading settings or using Quick Locations does not create it, and PME does not silently redirect a configured missing folder to the default.
Keeping existing settings¶
PME uses resources.folders when it is already configured. Otherwise, it carries the single-folder setting from 2.1.1 and earlier into the list.
Configured backup and log destinations are also retained. Only missing destinations are filled once from the first folder’s backups/ and logs/ subfolders.
They then become independent save locations. No files are moved or copied.
When resources.icons is missing, PME registers each resource folder’s icons/ once: always for the first folder, and for other folders unless the folder can be read and has no icons/.
If the first folder exists but has no icons/ at that time, PME creates it so the default icon location is ready.
An empty resources.icons array is kept as it is.
Saving and applying changes¶
Edit method |
When changes take effect |
|---|---|
Resources screen |
Immediately after |
External editor |
On the next Blender startup or when PME is re-enabled. |
If saving fails, PME keeps using the last saved settings and leaves the unsaved edit visible. PME preserves the file’s other JSON fields when saving resource settings.
Enable import pme¶
If you want to use PME from external scripts or other addons via import pme, you must enable it explicitly.
Steps¶
Open Preferences > Settings > Developer
Turn on Enable import pme Alias
Restart Blender
import pme
pme.invoke_pm("My Pie Menu")
Why is this opt-in?¶
A Blender Extension package name varies with its installation source, for example
bl_ext.<repository>.pie_menu_editor. PME registers import pme as a short alias so
external scripts do not have to hard-code that physical package name.
The alias is a top-level name shared by the Blender process, so PME keeps it opt-in. This setting controls only whether the alias is installed. The Public API remains Experimental.
Note
The Extensions UI may show these warnings after you enable the alias:
Policy violation with top level module: pmePolicy violation with top level module: pme.constants
Blender reports them because these modules are registered under top-level names
outside the Extension’s bl_ext... namespace. For PME’s opt-in alias, this is
expected and does not mean that PME failed to enable or that import pme is broken.
If the alias works, no action is required. If you do not need the alias, turn the
option off and restart Blender.
See also
See Public API for the current API reference.
Enable init logging¶
If PME has trouble during startup, init logging can help show where initialization stopped.
Enable it from Settings¶
Open Preferences > Settings > Developer
Turn on Enable Init Log
Restart Blender
Check Blender’s system console on Windows, or launch Blender from a terminal on macOS/Linux to see the startup log
Enable it by editing boot_config.json¶
If startup trouble prevents you from opening Preferences, or if you want to control the next startup from an external file, you can edit boot_config.json directly.
{
"version": 1,
"enable_public_api_alias": false,
"init_log_enabled": true,
"persistence_backend": "prefs",
"dev": {
"use_loader_manifest": true,
"auto_generate_candidate": false
}
}
If you already have a boot_config.json, change init_log_enabled to true.
The change takes effect on the next Blender startup.
Enable it once from the command line¶
If you want init logging for a single run without changing your saved settings:
# macOS / Linux
blender --python-expr "import sys; sys.argv.append('--pme-log-init')" --
# Windows
blender.exe --python-expr "import sys; sys.argv.append('--pme-log-init')" --
Tip
The --pme-log-init flag takes priority over the stored setting.
Use it when you want temporary startup logs without editing boot_config.json.
Where to read the log¶
Blender system console
Preferences > Settings > Log
Reset¶
To reset only boot options, change them in the Developer tab.
Deleting boot_config.json also removes the resource folders, backup destination, and log destination.
Save a copy before resetting the whole file.
Warning
Unreadable files and invalid resource fields are not overwritten automatically. PME uses the previous paths, or the legacy Preferences/default paths if unavailable, and shows a warning. Correct the original file, then restart or re-enable the addon.