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$
2
  • $\begingroup$ What do you mean by template? Is it just a blend file you want to open? $\endgroup$ Commented Aug 29, 2018 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$ Commented Aug 29, 2018 at 10:41

1 Answer 1

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')"
$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .