diff options
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 3 |
4 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 2a3545847f2..0ed803a7521 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -402,7 +402,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node) } /* buttons rect? */ - if ((node->flag & NODE_OPTIONS) && node->typeinfo->uifunc) { + if (node->typeinfo->uifunc && (node->flag & NODE_OPTIONS)) { dy -= NODE_DYS / 2; /* set this for uifunc() that don't use layout engine yet */ diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 6c7ccf6264b..aae7d632497 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1411,7 +1411,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag) if (toggle_flag == NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW) == 0) continue; - if (toggle_flag == NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS) == 0) + if (toggle_flag == NODE_OPTIONS && !(node->typeinfo->uifunc || node->typeinfo->uifuncbut)) continue; if (node->flag & toggle_flag) @@ -1425,7 +1425,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag) if (toggle_flag == NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW) == 0) continue; - if (toggle_flag == NODE_OPTIONS && (node->typeinfo->flag & NODE_OPTIONS) == 0) + if (toggle_flag == NODE_OPTIONS && !(node->typeinfo->uifunc || node->typeinfo->uifuncbut)) continue; if ((tot_eq && tot_neq) || tot_eq == 0) diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index eaafb2b05d2..b74d1bf2ef8 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -207,7 +207,7 @@ static void node_socket_add_replace(const bContext *C, bNodeTree *ntree, bNode * break; if (node_from) - if (!(node_from->inputs.first == NULL && !(node_from->typeinfo->flag & NODE_OPTIONS))) + if (node_from->inputs.first || node_from->typeinfo->uifunc || node_from->typeinfo->uifuncbut) node_from = NULL; if (node_prev && node_prev->type == type && node_link_item_compare(node_prev, item)) { diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 825ec43ebdc..e16f2a5f8ba 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1336,9 +1336,6 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc nt->freefunc_api = (have_function[5]) ? rna_Node_free : NULL; nt->uifunc = (have_function[6]) ? rna_Node_draw_buttons : NULL; nt->uifuncbut = (have_function[7]) ? rna_Node_draw_buttons_ext : NULL; - /* node buttons are only drawn if the options flag is set */ - if (nt->uifunc || nt->uifuncbut) - nt->flag |= NODE_OPTIONS; /* sanitize size values in case not all have been registered */ if (nt->maxwidth < nt->minwidth) |