diff options
author | Jacques Lucke <jacques@blender.org> | 2022-05-30 13:43:26 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-05-30 13:44:42 +0300 |
commit | 2f77b2daaccfa00866f049e4c2fc1cdee41e8ae1 (patch) | |
tree | 73c49c12aa96bd7c2fac5022e55416986a7e0910 /source/blender/blenkernel/intern | |
parent | ce1dd44c6848142e5192c3f30e98e285f04f8461 (diff) |
Nodes: call init function for new node trees in ntreeAddTree
Issue found in D15033, for some more info see comments there.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index cf3b4f7bdf2..4d96ba58d28 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -2668,6 +2668,7 @@ bNodeTree *ntreeAddTree(Main *bmain, const char *name, const char *idname) flag |= LIB_ID_CREATE_NO_MAIN; } bNodeTree *ntree = (bNodeTree *)BKE_libblock_alloc(bmain, ID_NT, name, flag); + BKE_libblock_init_empty(&ntree->id); if (is_embedded) { ntree->id.flag |= LIB_EMBEDDED_DATA; } |