diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-02-10 16:12:35 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-02-10 16:12:35 +0300 |
commit | d16e5babaf5c3bcb6fb407b49811d0b2f7c6456f (patch) | |
tree | 8060af46373a84733948560c161f5e984bb2183f /source/blender | |
parent | e2befa425a84c9e4ec715442e85624a5d3669a4f (diff) | |
parent | 04d55038ee52fc1155cc0ece916d90fd535c2364 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_node_tree_update.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node_tree_update.cc | 5 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.cc | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node_tree_update.h b/source/blender/blenkernel/BKE_node_tree_update.h index 443ceafb073..834445420ef 100644 --- a/source/blender/blenkernel/BKE_node_tree_update.h +++ b/source/blender/blenkernel/BKE_node_tree_update.h @@ -60,6 +60,8 @@ void BKE_ntree_update_tag_link_removed(struct bNodeTree *ntree); void BKE_ntree_update_tag_link_added(struct bNodeTree *ntree, struct bNodeLink *link); void BKE_ntree_update_tag_link_mute(struct bNodeTree *ntree, struct bNodeLink *link); +/** Used when the a new output node becomes active and therefore changes the output. */ +void BKE_ntree_update_tag_active_output_changed(struct bNodeTree *ntree); /** Used after file loading when run-time data on the tree has not been initialized yet. */ void BKE_ntree_update_tag_missing_runtime_data(struct bNodeTree *ntree); /** Used when the interface sockets/values have changed. */ diff --git a/source/blender/blenkernel/intern/node_tree_update.cc b/source/blender/blenkernel/intern/node_tree_update.cc index 904a0de9a90..9f3ce68ca69 100644 --- a/source/blender/blenkernel/intern/node_tree_update.cc +++ b/source/blender/blenkernel/intern/node_tree_update.cc @@ -1614,6 +1614,11 @@ void BKE_ntree_update_tag_link_mute(bNodeTree *ntree, bNodeLink *UNUSED(link)) add_tree_tag(ntree, NTREE_CHANGED_LINK); } +void BKE_ntree_update_tag_active_output_changed(bNodeTree *ntree) +{ + add_tree_tag(ntree, NTREE_CHANGED_ANY); +} + void BKE_ntree_update_tag_missing_runtime_data(bNodeTree *ntree) { add_tree_tag(ntree, NTREE_CHANGED_ALL); diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index a513f5df7a0..aa27edd77a7 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -667,6 +667,7 @@ void ED_node_set_active( node->flag |= NODE_DO_OUTPUT; if (!was_output) { do_update = true; + BKE_ntree_update_tag_active_output_changed(ntree); } } @@ -684,6 +685,7 @@ void ED_node_set_active( } node->flag |= NODE_DO_OUTPUT; + BKE_ntree_update_tag_active_output_changed(ntree); } ED_node_tree_propagate_change(nullptr, bmain, ntree); @@ -750,6 +752,7 @@ void ED_node_set_active( node->flag |= NODE_DO_OUTPUT; if (was_output == 0) { + BKE_ntree_update_tag_active_output_changed(ntree); ED_node_tree_propagate_change(nullptr, bmain, ntree); } @@ -765,6 +768,7 @@ void ED_node_set_active( } node->flag |= NODE_DO_OUTPUT; + BKE_ntree_update_tag_active_output_changed(ntree); ED_node_tree_propagate_change(nullptr, bmain, ntree); } } |