diff options
-rw-r--r-- | source/blender/blenkernel/intern/library_remap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index 40441034171..62f59832481 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -378,6 +378,18 @@ static void libblock_remap_data_postprocess_obdata_relink(Main *UNUSED(bmain), O } } +static void libblock_remap_data_postprocess_nodetree_update(Main *bmain, ID *new_id) +{ + /* Verify all nodetree user nodes. */ + ntreeVerifyNodes(bmain, new_id); + + /* Update node trees as necessary. */ + FOREACH_NODETREE(bmain, ntree, id) { + /* make an update call for the tree */ + ntreeUpdateTree(bmain, ntree); + } FOREACH_NODETREE_END +} + /** * Execute the 'data' part of the remapping (that is, all ID pointers from other ID datablocks). * @@ -551,6 +563,8 @@ void BKE_libblock_remap_locked( default: break; } + /* Node trees may virtually use any kind of data-block... */ + libblock_remap_data_postprocess_nodetree_update(bmain, new_id); /* Full rebuild of DAG! */ DAG_relations_tag_update(bmain); |