geonodes : scripting Geometry Nodes
Initialize a tree
- GeoNodes and ShaderNodes : scripting nodes starts by instantianting a Tree
- Break : exiting from a tree context can be done by raising this exception
Create nodes
- Layout : to place nodes in a frame
- Panel : to place inputs into a panel
- Group : create a <*Node Group> node
- G : a different way to create a <*Node Group> node
- Node : base class to create any node in a tree (normally, no need to instantiate it directly)
- Specific node : ColorRamp
Libraries
- gnmath : math library providing mathematical functions coming from nodes <Node Math>, <Node Vector Math> and <*Node Boolean Math>
- nd (for nodes) : this special class exposes one method or property per node, especially useful for input nodes such as <Node Index> or <Node Position>
- snd (for shader nodes) : same as nd for shader node
Sockets
Rather than using Node class, scripting nodes is done by using Socket classes:
-
Data sockets:
-
Attributes: Boolean, Integer, Float, Color, Vector, Rotation, Matrix
-
Blender resources: Collection, Object, Image, Material, Font, Texture
-
Geometry sockets: Mesh, Curve, GreasePencil, Cloud, Instances, Volume
- Shaders specific: Shader, VolumeShader
Domains
Geometries have specific Domain: