Node API

All nodes are subclasses of bpy.types.Node and animation_node.base_types.node.AnimationNode. This second super class allowed me to add many functions that make working with nodes very easy.

Each node has a unique identifier.

Class Properties

bl_idname:
Unique string that identifies the node type. Make a good decision here because later changes will break existing files. Examples are an_FloatMathNode or an_EvaluateSpline.
bl_label:
String that will be used as default name and in the search box.

The next class properties are only optional.

searchTags:

Can be two different things:

  • Just a list of strings that will be shown in the search box so that the user can find the node easier. (e.g. searchTags = ["Object Replicator (old)"])

  • A list of tuples. Each tuple has the normal search string and a dictionary which contains default values for specific node properties when the search tag was selected.

    1
    2
    3
    searchTags = [ ("Blend Matrices", {"dataType" : repr("Matrix")}),
         ("Blend Vectors", {"dataType" : repr("Vector")}),
         ("Blend Floats", {"dataType" : repr("Float")}) ]
    
onlySearchTags:
When True the bl_label won’t be used in the search box.

Handling events invoked by the user

The create function

The edit function

The duplicate function

The delete function

Reacting on socket changes