2
$\begingroup$

When I launch blender with -P and --python-console together like this

blender -b -P my_script.py --python-console

my script is loaded after I exit the python console. How can I run it before the python console shows up? Or can I make it run right after the console starts?

$\endgroup$
1
  • $\begingroup$ I think that is the way blender is setup to work. This answer might help, it links to an addon that makes it easy to run scripts in blender's gui python console and the same technique exec(compile(text)) can be used to run a script from the cli console. $\endgroup$
    – sambler
    Jun 11 '17 at 10:20

Your Answer

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

Browse other questions tagged or ask your own question.