From 77760194fe9ec67721ca7ea5ef111f734d2e240a Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 17 Dec 2021 15:40:06 +0100 Subject: Cleanup: use new c++ guarded allocator api in some files --- source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc') diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc index a438c1d6086..f69f773ce21 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc @@ -55,8 +55,7 @@ static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) static void node_init(bNodeTree *UNUSED(tree), bNode *node) { - NodeGeometryCurveFillet *data = (NodeGeometryCurveFillet *)MEM_callocN( - sizeof(NodeGeometryCurveFillet), __func__); + NodeGeometryCurveFillet *data = MEM_cnew(__func__); data->mode = GEO_NODE_CURVE_FILLET_BEZIER; node->storage = data; -- cgit v1.2.3 From d3ad04172de2b928aeb561b74a58996586b1db1c Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 3 Jan 2022 19:32:33 -0500 Subject: Cleanup: Remove bNodeType flag from base registration functions This flag is only used a few small cases, so instead of setting the flag for every node only set the required flag for the nodes that require it. Mostly the flag is used to set `ntype.flag = NODE_PREVIEW` For nodes that should have previews by default which is only some compositor nodes and some texture nodes. The frame node also sets the `NODE_BACKGROUND` flag. All other nodes were setting a flag of 0 which has no purpose. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13699 --- source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc') diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc index f69f773ce21..1a44fce86a6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc @@ -646,7 +646,7 @@ void register_node_type_geo_curve_fillet() static bNodeType ntype; - geo_node_type_base(&ntype, GEO_NODE_FILLET_CURVE, "Fillet Curve", NODE_CLASS_GEOMETRY, 0); + geo_node_type_base(&ntype, GEO_NODE_FILLET_CURVE, "Fillet Curve", NODE_CLASS_GEOMETRY); ntype.draw_buttons = file_ns::node_layout; node_type_storage( &ntype, "NodeGeometryCurveFillet", node_free_standard_storage, node_copy_standard_storage); -- cgit v1.2.3