diff options
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 80a553ff525..e2e61284d2e 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -404,6 +404,8 @@ static void write_node_socket_interface(BlendWriter *writer, bNodeSocket *sock) /* this is only direct data, tree itself should have been written */ void ntreeBlendWrite(BlendWriter *writer, bNodeTree *ntree) { + BKE_id_blend_write(writer, &ntree->id); + /* for link_list() speed, we write per list */ if (ntree->adt) { @@ -525,9 +527,6 @@ static void ntree_blend_write(BlendWriter *writer, ID *id, const void *id_addres ntree->execdata = NULL; BLO_write_id_struct(writer, bNodeTree, id_address, &ntree->id); - /* Note that trees directly used by other IDs (materials etc.) are not 'real' ID, they cannot - * be linked, etc., so we write actual id data here only, for 'real' ID trees. */ - BKE_id_blend_write(writer, &ntree->id); ntreeBlendWrite(writer, ntree); } @@ -853,6 +852,8 @@ IDTypeInfo IDType_ID_NT = { .blend_read_data = ntree_blend_read_data, .blend_read_lib = ntree_blend_read_lib, .blend_read_expand = ntree_blend_read_expand, + + .blend_read_undo_preserve = NULL, }; static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType *ntype) @@ -4662,7 +4663,7 @@ static void registerFunctionNodes(void) register_node_type_fn_random_float(); } -void init_nodesystem(void) +void BKE_node_system_init(void) { nodetreetypes_hash = BLI_ghash_str_new("nodetreetypes_hash gh"); nodetypes_hash = BLI_ghash_str_new("nodetypes_hash gh"); @@ -4689,7 +4690,7 @@ void init_nodesystem(void) registerFunctionNodes(); } -void free_nodesystem(void) +void BKE_node_system_exit(void) { if (nodetypes_hash) { NODE_TYPES_BEGIN (nt) { |