Blender V5.3
NOD_register.hh File Reference

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define NOD_REGISTER_NODE(REGISTER_FUNC)

Functions

void blender::register_nodes ()
void blender::register_compositor_nodes ()
void blender::register_function_nodes ()
void blender::register_geometry_nodes ()
void blender::register_shader_nodes ()
void blender::register_texture_nodes ()
Node Frame
void blender::register_node_type_frame ()
Node Re-Route
void blender::register_node_type_reroute ()
Implicit Conversion Node
void blender::register_node_type_implicit_conversion ()
Node #GROUP_INPUT / #GROUP_OUTPUT
void blender::register_node_type_comment ()
void blender::register_node_type_group_input ()
void blender::register_node_type_group_output ()

Macro Definition Documentation

◆ NOD_REGISTER_NODE

#define NOD_REGISTER_NODE ( REGISTER_FUNC)
Value:
void REGISTER_FUNC##_discover(); \
void REGISTER_FUNC##_discover() \
{ \
REGISTER_FUNC(); \
}

This macro has three purposes:

  • It serves as marker in source code that discover_nodes.py can search for to find nodes that need to be registered. This script generates code that calls the register functions of all nodes.
  • It creates a non-static wrapper function for the registration function that is then called by the generated code. This wrapper is necessary because the normal registration is static and can't be called from somewhere else. It could be made non-static, but then it would require a declaration to avoid warnings.
  • It reduces the amount of "magic" with how node registration works. The script could also search for node_register functions directly, but then it would not be apparent in the code that anything unusual is going on.

Definition at line 42 of file NOD_register.hh.