Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2022-09-28 16:08:09 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-09-30 12:53:03 +0300
commit8ba508d70bff949aec6b791349a55fd96bf94dd9 (patch)
treee7276a68c569a9fc8da247f35f170dddbef55520 /source/blender/editors/space_node
parent2004827bc990708117548c77337af13603efb37a (diff)
Fix missing Outliner updates when adding nodetrees
When e.g. grouping nodes into nodegroups, these would not show up immediately in the Outliner (Blender File / Data API view). Now send (unique combination, not used elsewhere) notifiers (and listen for these in the Outliner). Differential Revision: https://developer.blender.org/D16093
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_add.cc2
-rw-r--r--source/blender/editors/space_node/node_group.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc
index efe53fd6f14..10e903ca79b 100644
--- a/source/blender/editors/space_node/node_add.cc
+++ b/source/blender/editors/space_node/node_add.cc
@@ -777,6 +777,8 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
ED_node_tree_update(C);
}
+ WM_event_add_notifier(C, NC_NODE | NA_ADDED, NULL);
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc
index 21def1bd9d7..e0de5e2f71d 100644
--- a/source/blender/editors/space_node/node_group.cc
+++ b/source/blender/editors/space_node/node_group.cc
@@ -1047,6 +1047,8 @@ static int node_group_make_exec(bContext *C, wmOperator *op)
ED_node_tree_propagate_change(C, bmain, nullptr);
+ WM_event_add_notifier(C, NC_NODE | NA_ADDED, NULL);
+
/* We broke relations in node tree, need to rebuild them in the graphs. */
DEG_relations_tag_update(bmain);