Custom Node tutorial
I've just worked my way through the custom tutorial. This raised a comment and some questions:
Comment - In the shader section of the tutorial, the nodes Multiply 1 and Add 1 dont seem necessary to produce your final result. Your final has a single fixed hue (somewhere around 0.14) - whereas the effect of multiply 1 / add 1 would be to vary the hue. Incidentally, I used the "evaluate" node developed in the earlier section in place of a multiply and add - I thought that was a good idea to show some continuity through the tutorial.
Questions:
-
Looking at the evaluate node, I found this custom node worked as any other Nodebox node, correctly processing lists. It is clear that this is not being done in the custom Python code, so must be done in the Nodebox code before the python code is used to process individual list elements. So what if I want to write custom code that processed a whole list? An example might be a Fold function, taking a list, an initial accumulator value and a function. Is this possible, and if so, could the tutorial be extended to cover this?
-
The example functions only return scalar values. What would the code look like if a point was being returned? I guess this would involve creating a new point object, setting x and y values and returning the object. Similarly, can a custom function return a list and how would that code look?
-
It would be good to see some examples in Clojure.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac