[IPython-User] Possible to interface Blender?

klo uo klonuo@gmail....
Tue Jun 26 01:34:27 CDT 2012

On Mon, Jun 25, 2012 at 8:34 PM, Fernando Perez wrote:
> On Sun, Jun 24, 2012 at 11:55 PM, klo uo wrote:
>> So, is it at all possible to interface Blender with IPython by any means?
> I don't use blender so I can't really say, but in principle it should
> be possible.  Though you'll likely have to look carefully into how to
> load an ipython that is synced with the blender event loop, because I
> suspect that's the source of the blocking.  At first try, you can find
> out what gui toolkit blender uses and try to initialize your embedded
> ipython with gui support, there's a chance it will then work.

That's encouraging. Blender UI AFAIK is coded in OpenGL and whole
management design can be seen here:

In the meantime I found that Stani already posted some of his problems
about embedding IPython, on this mailing list. But that's for older
IPython and older Blender, now both have different APIs. Also
embedding IPython partially (as he made in his second try) in
Blender's text panel, is not what I'm after. Ideally I would like most
obvious - terminal running IPython interactively with running
Blander's namespace. But while it's easy to visualize it, as I enjoy
IPython commodity without knowledge about underlying layers, it's too
hard (or maybe impossible) for me to do it.

Blender own console uses Python's interactive console class from
code.py with some completer and helper functions.

Also, compiling Blender they made very easy. I'm saying this because
custom build can be tweaked to result in Python module, or with
embedded Numpy or linked to user's Python modules etc.
I did compile it as Python module, resulting in one large bpy.so file,
which can then be called from Python, but there is no UI, it's not
interactive and only option is to render result to image file.

> But this may require some additional work on your part and getting
> help from the blender experts as well.  Don't forget to report on any
> progress you make, as it could be of interest to others!

Yes, maybe I'm missing something also. I'll try to find who should I
contact and hopefully get some help. If I find anything useful I'll
reply again


More information about the IPython-User mailing list