[Bf-blender-cvs] [2202259e9c1] master: Fix T96909: crash when assigning new node group to group node

Jacques Lucke noreply at git.blender.org
Thu Mar 31 11:57:58 CEST 2022


Commit: 2202259e9c1f704496c66a19c15d4174d6c9a3f0
Author: Jacques Lucke
Date:   Thu Mar 31 11:57:31 2022 +0200
Branches: master
https://developer.blender.org/rB2202259e9c1f704496c66a19c15d4174d6c9a3f0

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.

===================================================================

M	source/blender/makesrna/intern/rna_main_api.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list