Adding a Geometry Node¶
The best way to learn how to add a geometry node is to read through recent commits that have done the same thing.
A good example is this recent node addition: 48b08199d5
A few changes are necessary:
- Add the definition for the node type (
GEO_NODE_*
) in the nodes header.- This integer is used in some places to access the node type without its string idname
- Add a new file with the node's implementation in the geometry nodes folder.
- This file initializes the node type when Blender starts. The node type contains its inputs/outputs, execute callback, and other functions.
- Add the definition for the node in
NOD_static_types.h
.- This defines the node type's idname, RNA struct name, and its description.
- Add the name of the new file in CMake.
- Add the node to the add menu in Python.