diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-11 15:32:33 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-11 15:32:33 +0300 |
commit | 2fa85494fcbc79fb3714467fb3c72ea2e39b20d8 (patch) | |
tree | 8f3d841f3233170abe912a0b6f820125361d0dc2 /source/blender/editors | |
parent | c608858dd2ac96463c094853a3e7eb899ba6b1b8 (diff) |
progress
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_edit.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_group.cc | 13 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_relationships.cc | 6 |
3 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index d746f703cc6..85cf5a9116d 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -2537,7 +2537,7 @@ static int ntree_socket_change_type_exec(bContext *C, wmOperator *op) /* Need the extra update here because the loop above does not check for valid links in the node * group we're currently editing. */ - ntree->update |= NTREE_UPDATE_GROUP | NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag(ntree); /* Deactivate sockets. */ LISTBASE_FOREACH (bNodeSocket *, socket_iter, sockets) { @@ -2657,7 +2657,7 @@ static int ntree_socket_move_exec(bContext *C, wmOperator *op) } } - ntree->update |= NTREE_UPDATE_GROUP; + BKE_node_tree_update_tag_interface(ntree); ED_node_tree_propagate_change(C, CTX_data_main(C), ntree); WM_event_add_notifier(C, NC_NODE | ND_DISPLAY, nullptr); diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index d4dae694e4f..a4ff263a52b 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -40,6 +40,7 @@ #include "BKE_context.h" #include "BKE_lib_id.h" #include "BKE_main.h" +#include "BKE_node_tree_update.h" #include "BKE_report.h" #include "DEG_depsgraph_build.h" @@ -391,7 +392,7 @@ static int node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode) /* delete the group instance and dereference group tree */ nodeRemoveNode(bmain, ntree, gnode, true); - ntree->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag(ntree); return 1; } @@ -552,9 +553,9 @@ static int node_group_separate_selected( } } - ntree->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag(ntree); if (!make_copy) { - ngroup->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag(ngroup); } return 1; @@ -977,9 +978,9 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, } /* update of the group tree */ - ngroup->update |= NTREE_UPDATE | NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag(ngroup); /* update of the tree containing the group instance node */ - ntree->update |= NTREE_UPDATE_NODES | NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag(ntree); } static bNode *node_group_make_from_selected(const bContext *C, @@ -1009,7 +1010,7 @@ static bNode *node_group_make_from_selected(const bContext *C, node_group_make_insert_selected(C, ntree, gnode); /* update of the tree containing the group instance node */ - ntree->update |= NTREE_UPDATE_NODES; + BKE_node_tree_update_tag(ntree); return gnode; } diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc index a6d2a8924a0..1a1c9e040a0 100644 --- a/source/blender/editors/space_node/node_relationships.cc +++ b/source/blender/editors/space_node/node_relationships.cc @@ -36,6 +36,7 @@ #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_node.h" +#include "BKE_node_tree_update.h" #include "BKE_screen.h" #include "ED_node.h" /* own include */ @@ -851,7 +852,7 @@ static int link_socket_to_viewer(const bContext *C, else { link_to_change->fromnode = bnode_to_view; link_to_change->fromsock = bsocket_to_view; - btree->update |= NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag_link(btree); } remove_links_to_unavailable_viewer_sockets(*btree, *viewer_bnode); @@ -1037,8 +1038,7 @@ static void node_link_exit(bContext *C, wmOperator *op, bool apply_links) /* add link to the node tree */ BLI_addtail(&ntree->links, link); - - ntree->update |= NTREE_UPDATE_LINKS; + BKE_node_tree_update_tag_link(ntree); /* tag tonode for update */ link->tonode->update |= NODE_UPDATE; |