Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-20 21:25:22 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-24 13:44:27 +0300
commitd730e512ac56bd68c75f8c44ff186b51010db4c7 (patch)
treedddf69daf78ac1627db7069ef3012b8ecb54017f /source/blender/blenkernel/intern/library_remap.c
parent62421470ee09fb70f343eb9fd48b093316c8eea1 (diff)
Nodes: avoid slow and unecessary node group updates on file read
On file read we need to update group nodes in case the group they refer to has changed its inputs and outputs. This had O(n^2) time complexity and was updating all datablocks even if they did not change.
Diffstat (limited to 'source/blender/blenkernel/intern/library_remap.c')
-rw-r--r--source/blender/blenkernel/intern/library_remap.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 7657b47bcf5..4ed3c4f9501 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -387,15 +387,8 @@ static void libblock_remap_data_postprocess_obdata_relink(Main *bmain, Object *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_BEGIN (bmain, ntree, id) {
- /* make an update call for the tree */
- ntreeUpdateTree(bmain, ntree);
- }
- FOREACH_NODETREE_END;
+ /* Update all group nodes using a node group. */
+ ntreeUpdateAllUsers(bmain, new_id);
}
/**