I'd like to know if it was possible to test if my .blend, who is running in background, still open and, if it's possible, how can i do that with python please ?


Blender has a variable you can check for that bpy.app.background

Boolean, True when blender is running without a user interface (started with -b)

|improve this answer|||||
  • $\begingroup$ Thanks for your answer. I tested and told returned me False when i tried in the console of my active blend after launched another .blend (in background for this one). Did i have to "target" the .blend launched in background ? $\endgroup$ – pistiwique Jan 12 '16 at 19:29
  • $\begingroup$ The console you type it into will be the foreground blender that is running a gui. If you start another instance in the background from a script then you want that copy of blender to run a script that tests the background value. Try running blender --factory-startup -b --python-console in a terminal then type in import bpy bpy.app.background $\endgroup$ – sambler Jan 12 '16 at 19:47

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.