diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc b/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc index 363a2c424fd..f0b8579ae7d 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc @@ -23,7 +23,7 @@ namespace blender::nodes::node_geo_set_curve_handles_cc { -static void geo_node_set_curve_handles_declare(NodeDeclarationBuilder &b) +static void node_declare(NodeDeclarationBuilder &b) { b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE); b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().supports_field(); @@ -32,14 +32,12 @@ static void geo_node_set_curve_handles_declare(NodeDeclarationBuilder &b) b.add_output<decl::Geometry>(N_("Curve")); } -static void geo_node_set_curve_handles_layout(uiLayout *layout, - bContext *UNUSED(C), - PointerRNA *ptr) +static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiItemR(layout, ptr, "mode", UI_ITEM_R_EXPAND, nullptr, ICON_NONE); } -static void geo_node_set_curve_handles_init(bNodeTree *UNUSED(tree), bNode *node) +static void node_init(bNodeTree *UNUSED(tree), bNode *node) { NodeGeometrySetCurveHandlePositions *data = (NodeGeometrySetCurveHandlePositions *)MEM_callocN( sizeof(NodeGeometrySetCurveHandlePositions), __func__); @@ -132,7 +130,7 @@ static void set_position_in_component(const GeometryNodeCurveHandleMode mode, positions.save(); } -static void geo_node_set_curve_handles_exec(GeoNodeExecParams params) +static void node_geo_exec(GeoNodeExecParams params) { const NodeGeometrySetCurveHandlePositions *node_storage = (NodeGeometrySetCurveHandlePositions *)params.node().storage; @@ -172,14 +170,14 @@ void register_node_type_geo_set_curve_handles() geo_node_type_base( &ntype, GEO_NODE_SET_CURVE_HANDLES, "Set Handle Positions", NODE_CLASS_GEOMETRY, 0); - ntype.geometry_node_execute = file_ns::geo_node_set_curve_handles_exec; - ntype.declare = file_ns::geo_node_set_curve_handles_declare; + ntype.geometry_node_execute = file_ns::node_geo_exec; + ntype.declare = file_ns::node_declare; ntype.minwidth = 100.0f; - node_type_init(&ntype, file_ns::geo_node_set_curve_handles_init); + node_type_init(&ntype, file_ns::node_init); node_type_storage(&ntype, "NodeGeometrySetCurveHandlePositions", node_free_standard_storage, node_copy_standard_storage); - ntype.draw_buttons = file_ns::geo_node_set_curve_handles_layout; + ntype.draw_buttons = file_ns::node_layout; nodeRegisterType(&ntype); } |