From 2c00889d3e9d6357e6e1d1a977935c32f5ddcf32 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 1 Aug 2022 16:32:43 -0500 Subject: Cleanup: simplify function for adding node to editor Split it into two functions, one for static node types, and another for ID names. --- source/blender/editors/space_node/node_intern.hh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_node/node_intern.hh') diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh index 924537d0e8a..81c2bc0e962 100644 --- a/source/blender/editors/space_node/node_intern.hh +++ b/source/blender/editors/space_node/node_intern.hh @@ -245,12 +245,9 @@ void draw_nodespace_back_pix(const bContext &C, /* node_add.cc */ -/** - * XXX Does some additional initialization on top of #nodeAddNode - * Can be used with both custom and static nodes, - * if `idname == nullptr` the static int type will be used instead. - */ -bNode *node_add_node(const bContext &C, const char *idname, int type, float locx, float locy); +bNode *add_node(const bContext &C, StringRef idname, const float2 &location); +bNode *add_static_node(const bContext &C, int type, const float2 &location); + void NODE_OT_add_reroute(wmOperatorType *ot); void NODE_OT_add_group(wmOperatorType *ot); void NODE_OT_add_object(wmOperatorType *ot); -- cgit v1.2.3