Is it possible to take control of Blender with a standalone Python instance?

by Joel Gomes da Silva   Last Updated July 17, 2018 11:15 AM

I intend to make a framework for BGE using wxPython, being able to manage blend file libs, datablocks of the blends, alternative ways to make logic and ease the project management in general. I need to use Blender to edit the blend files contents (add logic bricks, edit datablocks, etc), so at first I thought to call blender in background mode through command line and execute Python scripts generated by the framework to make the changes to the blends. However, that would imply to open blender (in background) and save the blend file for each operation, even the simplest ones (like renaming), or queue the changes and add a annoying 'Apply' button. So, I wonder if it's possible to 'take control' of Blender's Python using the framework's Python, so the user can see the changes by the framework in real-time while being able to do changes that the framework won't do (like modeling, texturing, animation, etc). Is that possible? Thanks.

Answers 1

You'll have to build it yourself, but you can build Blender as a Python module. You can then do import bpy and use it as if you're inside Blender.

dr. Sybren
dr. Sybren
March 19, 2018 11:01 AM

Related Questions

BGE Object List within a specified distance

Updated August 14, 2017 12:15 PM

BGUI activate next TextInput wiget on enter key

Updated March 27, 2015 07:05 AM

Smooth Player Movement?

Updated April 03, 2015 21:23 PM