Nodes - Possible ideas..

Nodes with which to code with has already been discussed and there are both people who like and despise the idea.

We already have nodes for materials, textures and composition.

I’m wondering if it is possible to do that for scripts, what I mean by that is that the nodes wouldn’t be used to make a script but rather to use the script.

At the moment although with 2.5 scripting the gui has been a lot easier to make, with scripts like the bgen3 script or the A.N.T script where there are lots of different options then maybe the use of nodes will help the user set options for how they want to run the script.

For me, say I was writing a city script and I wanted to add customised buildings into the generation of the city then I could create a node for each building and

idea 1) node has a subtree so can edit building parameters if complex
idea 2) node has all editable parameters on node.

It may make more sense if in another example you wanted to control the population density and wanted to take multiple inputs such as images and other data into account. Doing this on a normal gui can getting messy.

I may have not described this idea too well, so ask me if you need a better description.

Does anyone think that this could be a good idea?

Any idea how it could be implemented?

Would it be possible to copy the compositor node editor code over, and make it possible to make custom nodes through python?

imho, you are confusing nodes with a good script user interface (UI) and python class structure/functions to call/ways to modularize your code.

Perhaps but I am not asking if this can be used for all scripts just those that want to. I think modularization would be easier in this way. I guess that because I use mindmaps for learning compared to lists then my view is slightly bias towards visual node based interfaces. However I dont mind using the UI provided, but if I wanted to give the user greater control over the parameters then I could run into a multitude of different tabs or screens whereas nodes or something similar could help in this matter.

And its easier to visualise relationships in a graph format than in a gui format.

Is it possible to make new self defined nodes with python or can this only be hardcoded with c++?

I’ve been wondering about programming with nodes for a while, but a bit different than what people have been talking about and not necessarily Blender related. I think nodes would be a cool way to program with a functional programming language, like scheme or lisp. Programming with those, in my limited experience with them, is sort of like using Legos anyway so it would feel even more like I’m actually building something. Really it would just be a GUI that does what you could already do in text but it would be a nice visual way to program and would pretty much eliminate most bracket errors, which are kinda easy to make in a language like scheme:

;merge
;merges two sorted lists
(define (merge left right comp)
   (if (null? left) right
         (if (null? right) left
             (if (comp (car left) (car right))
                 (cons (car left) (merge (cdr left) right comp))
                 (cons (car right) (merge left (cdr right) comp))))))

EDIT: scheme programmers, go easy on me :smiley: This is a piece of the first thing I ever did with a functional language

maybe, but if this was introduced then could it not be used in the game engine too.