Python + Node Editor

O.K., I had an idea recently to improve Blender. Not sure if this is the place to put it, but… I’ll see what you guys think. My idea is to use the node editor to do python programming, QuartzComposer-style (yes, that does mean that I’ve used a mac :mad:). For those of you who haven’t used QC, it is a flowchart-type programming style. So, you have boxes for each command that you would type in. Each box has input and output “ports”, and they’re connected in the same ways as the node editor.

I think it would be a major help to people (like me) who haven’t had the time to learn python, or are having trouble starting. I found this style made it really easy to learn the “language” quickly, and then get past the basics.

Obviously, it would probably be a complicated and long project, but what do you guys think?

I’ve been wanting to do this for literally years, but ultimately questions appear as to how to do various common programming tasks.

The other question is how low-level does it go, ie does it all start with text and numbers? There’s some serious conceptual obstacles.

For something like QC or the compositing engine it’s great, but the moment you want dynamic numbers of objects entering the system it becomes a serious headache.

The app which started me off was Max (on the Mac!) and more recently Pure Data. They have something close - but it still ends up quite messy.

The massive advantage of these systems is that they can run on multi-core systems very well indeed, without the programmer having to worry too much about it. Much more so than current programming techniques.

I started to write something similar a while back in python - but came across some obstacles. The idea was to create similar to your idea in the 3d view. - 3d object oriented programing. I would write part of a program and attach it to a 3d object. That way I would draw something in 3d that represented the code. Input parameters would be 3d text, and bit of code would be attached to a mesh. that way the same mesh could be used more than once (like functions) and parented to different objects. The outliner became like a code tree, and there was a main python program which would combine the bits of code based on what objects were parented to others in the 3d view.

In the end you could create a program by just joining 3d objects, or by putting sub-functions literally inside other functions!

It worked really well accept that I couldn’t re-order the items in the Blender Outliner window which was the function I was going to use to re-order the bits of code.

Blender is built to do that already - just use alt-d instead of shift-d and then when you edit one the change is in all, as you’ve simply copied the pointer.

Unless I missed what you’re doing entirely!

I’ve always been fascinated by the idea of making Blender more Houdini like in functionality, where everything is simply writing a program that results in the model which gets rendered. It’s flexible, but pretty confusing.

Go ahead, Im not sure how fine grained youd make it- would each if/then be a node?

This kinda stuff can prototype without too much trouble the problem I see is that if users are really going to give it a try is that it will need to be well supported, some docs, and maintained…
this is where the work is.

  • a lot of cool projects like this popup and then get neglected.