diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-02 00:32:43 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-02 00:32:43 +0300 |
commit | 2c00889d3e9d6357e6e1d1a977935c32f5ddcf32 (patch) | |
tree | 409b3f907f1c975aadff5472dae5fe47f4222a0b /source/blender/editors/space_node/node_intern.hh | |
parent | 6b6d3b86d5b08142656fbdd06217e9f029d12193 (diff) |
Cleanup: simplify function for adding node to editor
Split it into two functions, one for static node types,
and another for ID names.
Diffstat (limited to 'source/blender/editors/space_node/node_intern.hh')
-rw-r--r-- | source/blender/editors/space_node/node_intern.hh | 9 |
1 files changed, 3 insertions, 6 deletions
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); |