-1
$\begingroup$

I was wondering how is it possible to have a blender program run exclusively from a python program? I am wanting to create an application that calls a python code to run blender. But is it even possible? If you know any tutorials on this, let me know.

$\endgroup$
1
$\begingroup$

You could run blender from python like this:

import subprocess
subprocess.Popen(["blender", "myScene.blend"])

Or, if you want, could run your python script from blender like this:

blender myscene.blend --background --python myscript.py
$\endgroup$
  • $\begingroup$ Okay, so where would i run the code $\endgroup$ – Alexander Pagan Jul 19 '16 at 16:56
  • $\begingroup$ if you are running your python script from blender, you would enter the code into the command line. If you are running blender from python, just put the code in your python script. If you have any problems or questions, just comment again. $\endgroup$ – Billy S Jul 19 '16 at 17:15
  • $\begingroup$ so do you by chance know how to run a blender python script by command prompt $\endgroup$ – Alexander Pagan Jul 19 '16 at 17:20
  • $\begingroup$ To run a python script from the command line, type python absolutePathToScript.py $\endgroup$ – Billy S Jul 19 '16 at 17:49
  • $\begingroup$ how could i use addons through scripting mode $\endgroup$ – Alexander Pagan Jul 19 '16 at 18:01

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.