1
$\begingroup$

Hi and thanks for reading. I'm newbie and have problem to solve with Blender. We have a upper level app which will open a template of Blender with a button in GUI (for make difference startup file and userpref file). But I can't found in docs that argument for open template file so I'm asking community for help if this option is possible, if not hope anyone can help me Python script option for this problem. Thanks again!

$\endgroup$
  • $\begingroup$ What do you mean by template? Is it just a blend file you want to open? $\endgroup$ – Ray Mairlot Aug 29 '18 at 10:00
  • $\begingroup$ I'm just copy from docs: "Application templates are a feature that allows you to define a re-usable configuration that can be selected to replace the default configuration, without requiring a separate Blender installation or overwriting your personal settings." $\endgroup$ – Đinh Đàm Đình Aug 29 '18 at 10:41
2
$\begingroup$

There is no CLI option to choose which application templates is open at startup, you need to use python to tell blender to open one of the templates.

You need to call the bpy.ops.wm.read_homefile() operator, using --python-expr in the CLI arguments should be enough -

blender --python-expr "import bpy; bpy.ops.wm.read_homefile(app_template='usertemplate')"
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.