"connecting to an existing blender instance" is, in my own opinion, unnecessary. It would be better to start it from jupyter and then open the file you want to work on. This means more predictability, and your code in the notebook file is still relevant after the instance quits.
I don't believe an inline gui-preview is very useful. Normally I think I would use the windows side by side. But there are ways to achieve it, for example blender has an operator to make a screenshot, I think, and you can also turn the "pixels" data from Blender images (and the render result) into url-encoded image tags. Blender does a great job of distributing binaries for different platforms and still has a relatively convenient and unproblematic build process. However, currently there is no good way to add compiled python extensions or work with Python packages in general, for a lot of reasons which are hard to deal with. Individually, I can get some compiled extensions working with an addon, but if I wanted others to use this addon, they probably would have to compile blender and the addon for themselves, and do it almost every time they want to update blender. That's why I prefer to make my addons/scripts zero-install, but that is a whole different story. On Thu, Mar 30, 2017 at 1:35 PM, [email protected] <[email protected]> wrote: > yes, i think that supporting both the behaviour "launch a new blender > instance from jupyter" and "connect jupyter to this already running blender > istance" is one of my goals. > > the first one is the easiest to achieve, while the second one can be built > on this. > > It seems that the core of the blender kernel will have to face mostly > proper packaging issues, as it must well behave in various enviroments. > So, maybe it is possible to think of additional useful feature, like > in-notebook preview of main window? > > > Here is one implementation of such an asyncio based kernel: > > https://github.com/takluyver/aiokernel/blob/master/aiokernel.py > <https://github.com/takluyver/aiokernel/blob/master/aiokernel.py> > > thank you for this find, it will be usefull for sure > > 2017-03-30 11:24 GMT+02:00 Andreas Klostermann < > [email protected] > >: > > > As a starter this documentation may help: > > http://ipython.readthedocs.io/en/stable/development/index.html > > > > I'm not involved in Blender development, so you shouldn't take my views > as > > anything official. But my opinion is that a Jupyter integration for > Blender > > would be useful for users who write Python addons, but don't want to > > compile the sources themselves. Using Blender as a Python module would > > require compilation. Implementing the kernel protocol through asyncio > would > > mean it can be run from any blender binary distribution. The Jupyter > > notebook server would then have a kernel config which starts Blender > with a > > script, this script installs asyncio and listens on the specified port. > > Blender could be run with or without GUI. > > > > Here is one implementation of such an asyncio based kernel: > > https://github.com/takluyver/aiokernel/blob/master/aiokernel.py > > > > The problem with that is the zeromq protocol implementations for asyncio. > > The former code uses something called "zentedeschia", and there is also > > aiomzmq and I think pyzmq has another one. But they all depend on pyzmq > > which in turn requires compiled extensions. I haven't been able to load > > pyzmq into Blender at all, so far. Other than this little import, there > > should be nothing in the way of Jupyter/Blender integration. > > _______________________________________________ > > Bf-committers mailing list > > [email protected] > > https://lists.blender.org/mailman/listinfo/bf-committers > > > > > > -- > Andrea Barbadoro goo.gl/abpvJ _ > Mail: [email protected] _ > Mail: [email protected] _ > Mobile: +39 338 134 5403 _ > _______________________________________________ > Bf-committers mailing list > [email protected] > https://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-committers
