trygre.blogg.se

Blender application templates
Blender application templates











Otherwise you will either have to copy it there or create a zip file of the directory and install it by using Install Template from File. Your new template should be available right away when you restart Blender, if you've created the files in the directory where the other templates are stored. (If you're unfamiliar with software development simply copy and past the example given above, which does nothing.)

  • Open the init.py and modify the load_handler.
  • Open the startup.blend and adjust the UI to your liking.
  • blender application templates

    Either copy an existing template or create your own directory with a startup.blend and init.py.Now in order to create your own template you need to do three things: If you copy an existing template to create your own, you may want to edit this function or replace it's content with pass to make it do nothing. When you create your template you can add whatever additional Python code you like here. The load_handler() is the function that will be registered once you select the app template in Blender and then executed once the project is loaded. import bpyįrom import load_handler(dummy):īpy._factory_startup_post.append(load_handler)īpy._factory_startup_post.remove(load_handler) Below you see the basic structure of such an init.py. The folder name is the name of the template. This allows to perform additional configurations. The latter is a Python script that contains a callback function / handler that is executed once the startup.blend is loaded. The former is the default project that is loaded. This will print the path(s) where the build in application templates are stored.Įach template consists of a folder containing a startup.blend and a init.py. You can find the location of the template files by switching to the scripting workspace and typing the following code into the python console: for x in _template_paths(): If you don't have a zip file you can copy and modify one of the existing templates.

    blender application templates blender application templates

    The underlying operator PREFERENCES_OT_app_template_install allows you to install a zipped App Template. You can add your own App Template by using the Operator Search F3 to find Install Template from File.













    Blender application templates