Getting paths to Blender startup files

For different work directions in Blender, separate startup configurations are organized – sets of basic settings for scene parameters, rendering and user interface. Each configuration is stored in a separate file and is loaded from it when the user opens Blender or executes the “File – New” command from the main menu.

The initial (factory) startup files are stored in the Blender installation directory in the “bl_app_templates_system” folder:

Each subdirectory contains a startup file and an initializing script for a specific work process: 2D animation, add-on development, VFX, or video editing.

If necessary, creating your own startup file is very simple – you need to create a subdirectory in this directory with the desired name, for example “MyConfig” and copy there the .blend file in which your settings will be saved. After restarting Blender, a new item will appear in the “File – New” menu.

If the user makes changes to the startup file and saves it with the “File – Defaults – Save Startup File” command in the main menu, the user startup file is saved in the directory with the user data, also each in its own subdirectory:

When starting Blender, user startup files take precedence over default ones.

You can access a set of startup files through the Blender Python API using the “app_template_paths()” function, which returns the “app_template_paths” generator.

By iterating the elements of the generator, we can get a pointer to the “bl_app_templates_system” directory, in which startup files are physically located.

Walking through this directory and its subdirectories in search of the “startup.blend” files, we will get the paths to all existing startup files.

Having received the full path to the startup file, we can, for example, load the necessary parameters and settings from it, or perform any other actions with it.

0 0 votes
Article Rating
Notify of

0 Comment
Inline Feedbacks
View all comments