Blender Git Commit Log

Git Commits -> Revision cfa48c8

Revision cfa48c8 by Hans Goudey (master)
February 8, 2021, 21:09 (GMT)
Cleanup: Register node property layout callbacks in files

This commit moves the property layout callbacks for node types to their
implementation files from `drawnode.c`. This was proposed a while ago in
T75724.

**Benefits**
- Fewer files need to be changed when adding a new node.
- Makes it possible to reuse functions from the node's implementation
in the layout code.
- Except for RNA, all of the node "inputs" are in the same place.
- Code gets shorter overall, avoids the large switch statements.

**Downsides**
- Requires including two UI headers.
- Requires adding an editors dependency to the nodes folder.

This commit only changes function nodes and geometry nodes, more can be
moved later.

Differential Revision: https://developer.blender.org/D10352

Commit Details:

Full Hash: cfa48c84d06ca8197f86b6d3ceef8a2c7c311a82
Parent Commit: 13299a7
Lines Changed: +354, -429

29 Modified Paths:

/source/blender/editors/include/UI_interface_icons.h (+3, -2) (Diff)
/source/blender/editors/space_node/drawnode.c (+0, -391) (Diff)
/source/blender/nodes/CMakeLists.txt (+1, -0) (Diff)
/source/blender/nodes/function/nodes/node_fn_boolean_math.cc (+9, -0) (Diff)
/source/blender/nodes/function/nodes/node_fn_float_compare.cc (+9, -0) (Diff)
/source/blender/nodes/function/nodes/node_fn_input_vector.cc (+10, -1) (Diff)
/source/blender/nodes/function/nodes/node_fn_switch.cc (+10, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc (+15, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc (+11, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_compare.cc (+13, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_fill.cc (+10, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc (+32, -12) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc (+13, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_proximity.cc (+15, -4) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc (+11, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc (+11, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc (+42, -19) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_boolean.cc (+9, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc (+9, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_object_info.cc (+9, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc (+14, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_point_distribute.cc (+11, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_point_instance.cc (+12, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_point_rotate.cc (+21, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_point_scale.cc (+9, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc (+9, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc (+15, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_triangulate.cc (+10, -0) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc (+11, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021