Skip to content

Data Classes

geonodes classes are named after their name in Geometry Nodes, for instance: Integer socket -> Integer class.

Blender Nodes are implemented as methods, properties and operators working on these classes. For instance, if a and b are two Floats, the script a + b will generate a Math node with ADD operation. The result of this operation is the Output Socket of the node.

a + b

Geometry Classes

There is basically one single socket type which is Geometry. But geonodes implemented sub types to increase object oriented framework:

Attribute Classes

  • Boolean : Boolean socket, compatible with python bool
  • Integer : Integer socket, compatible with python int
  • Float : Float socket, compatible with python float
  • Vector : Vector socket, compatible with python tuple
  • Color : Vector socket, compatible with python tuple
  • Rotation : Rotation socket
  • Matrix : Matrix socket

Blender Resources

Blender resources can be passed either by their name or by instance:

Other Sockets

  • String : String socket, compatible with python str
  • Menu : Menu socket, can be set with a valid python str
  • Closure : Closure socket
  • Bundle : Bundle socket

Shader sockets

Domains

Geometry classes have one or several Domain attributes following Blender data structure. The domains are the following: - Mesh - points - faces - edges - corners - Curve - points - splines - GreasePencil - layers - Cloud - points - Instances - insts - Volume

The Domain attribute is used in nodes having a Domain parameter. In the following example, the node 'Store Named Attribute' is setup with the domain calling the method:

      # Create a Cube
      mesh = Mesh.Cube()

      # Store on domain POINT
      mesh.points.store_named_attribute("Point Value", 0.)

      # Store on domain FACE
      mesh.faces.store_named_attribute("Face Value", 0.)

Warning

A Domain is never instanced directly, it is always initialized as a property of a Geometry Class.