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:
authorJacques Lucke <jacques@blender.org>2022-03-31 12:57:31 +0300
committerJacques Lucke <jacques@blender.org>2022-03-31 12:57:45 +0300
commit2202259e9c1f704496c66a19c15d4174d6c9a3f0 (patch)
tree00acef3cb2e8c8d96e973b53587bc5aaae94777d
parentdc73c71b3b9b84663bc2ad7c15a890f509f27d83 (diff)
Fix T96909: crash when assigning new node group to group node
The node group returned by `bpy.data.node_groups.new(...)` was not updated properly.
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index b239260c8eb..6c621604e40 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -92,6 +92,7 @@
# include "DNA_volume_types.h"
# include "DNA_world_types.h"
+# include "ED_node.h"
# include "ED_screen.h"
# include "BLT_translation.h"
@@ -291,6 +292,7 @@ static struct bNodeTree *rna_Main_nodetree_new(Main *bmain, const char *name, in
bNodeTreeType *typeinfo = rna_node_tree_type_from_enum(type);
if (typeinfo) {
bNodeTree *ntree = ntreeAddTree(bmain, safe_name, typeinfo->idname);
+ ED_node_tree_propagate_change(NULL, bmain, ntree);
id_us_min(&ntree->id);
return ntree;