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.
This commit is contained in:
parent
dc73c71b3b
commit
2202259e9c
Notes:
blender-bot
2023-02-14 08:24:03 +01:00
Referenced by issue #96909, Regression: Crash linking Geometry Nodes tree data block to a new node group.
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue