Revert previous commit and do proper fix for missing typeinfo in nodes.
This commit is contained in:
parent
7529690df3
commit
c31bc465ea
|
@ -1684,7 +1684,7 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
|
|||
remove_animdata &= ntree && !(ntree->flag & NTREE_IS_LOCALIZED);
|
||||
|
||||
/* extra free callback */
|
||||
if (use_api_free_cb && node->typeinfo != NULL && node->typeinfo->freefunc_api) {
|
||||
if (use_api_free_cb && node->typeinfo->freefunc_api) {
|
||||
PointerRNA ptr;
|
||||
RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
|
||||
|
||||
|
@ -1711,7 +1711,7 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
|
|||
BKE_animdata_fix_paths_remove((ID *)ntree, prefix);
|
||||
}
|
||||
|
||||
if (node->typeinfo != NULL && ntree->typeinfo->free_node_cache)
|
||||
if (ntree->typeinfo->free_node_cache)
|
||||
ntree->typeinfo->free_node_cache(ntree, node);
|
||||
|
||||
/* texture node has bad habit of keeping exec data around */
|
||||
|
@ -1721,7 +1721,7 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
|
|||
}
|
||||
}
|
||||
|
||||
if (node->typeinfo != NULL && node->typeinfo->freefunc) {
|
||||
if (node->typeinfo->freefunc) {
|
||||
node->typeinfo->freefunc(node);
|
||||
}
|
||||
|
||||
|
|
|
@ -8833,6 +8833,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
|
|||
/* Now that all our data-blocks are loaded, we can re-generate overrides from their references. */
|
||||
if (fd->memfile == NULL) {
|
||||
/* Do not apply in undo case! */
|
||||
lib_verify_nodetree(bfd->main, true); /* Needed to ensure we have typeinfo in nodes... */
|
||||
BKE_main_override_static_update(bfd->main);
|
||||
BKE_collections_after_lib_link(bfd->main);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue