Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Python reusable component that is like the Blender node editor? [closed]

Blender has a powerful, fun-to-use, flexible node editor:

Blender 2.6 node editor

Is there a Python library that will allow me to easily create a visual developing environment like this? In Blender, the node editor works with shaders, images, colors and the like, and I'd like to define the types of nodes, sockets and preview widgets myself, as in building a "visual DSL".

Edit: I don't want to create custom nodes within Blender, but use a component LIKE the node editor in my own projects. I removed the Blender tag to avoid confusion.

like image 232
Phae7rae Avatar asked Feb 18 '14 16:02

Phae7rae


People also ask

Where is Blender node editor?

If you switch to the Compositing screen with Ctrl-Left , if you are on the default screen, you will find a Node Editor on the top half of the screen. When you enabled material nodes, a material node and an output node were automatically added to the Node editor.

How do you remove a node from a frame?

To remove nodes from a frame, select and use Alt - P . This can be thought of as unparenting the selection from the frame.


1 Answers

You can find how to do that in the documentation:

http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes

If you want to use the nodes to build objects and meshes procedurally with it then I recommend you to use and/or fork and and improve this project:

http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Nodes/Sverchok

(These guys are also using the API linked above)

If you have blender specific questions, like this, I also recommend you to ask it on this blender dedicated stack exchange site:

https://blender.stackexchange.com/


EDIT:

As far as I know, there isn't any pre-made node-editor widget or anything similar like that in any UI libraries. However it is quite easy to implement the basic rectangles , input and output ports and the bezier lines to connect them. After the first steps it is only a matter of preference how many hours you put into design and smaller details.

I implemented my own in Python with the builtin tkinter library:

enter image description here

And then later in Pyglet and after that to improve speed I implemented it in pure C with OpenGL wrapped with Cython for Python usage:

enter image description here

like image 112
Peter Varo Avatar answered Sep 22 '22 06:09

Peter Varo