From d730e512ac56bd68c75f8c44ff186b51010db4c7 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 20 Apr 2019 20:25:22 +0200 Subject: 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. --- source/blender/makesrna/intern/rna_nodetree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 1ce7b776126..e4270f3854e 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2597,7 +2597,7 @@ static StructRNA *rna_NodeCustomGroup_register(Main *bmain, return NULL; /* this updates the group node instance from the tree's interface */ - nt->verifyfunc = node_group_verify; + nt->group_update_func = node_group_update; nodeRegisterType(nt); @@ -2621,7 +2621,7 @@ static StructRNA *rna_ShaderNodeCustomGroup_register(Main *bmain, if (!nt) return NULL; - nt->verifyfunc = node_group_verify; + nt->group_update_func = node_group_update; nt->type = NODE_CUSTOM_GROUP; register_node_type_sh_custom_group(nt); @@ -2646,7 +2646,7 @@ static StructRNA *rna_CompositorNodeCustomGroup_register(Main *bmain, if (!nt) return NULL; - nt->verifyfunc = node_group_verify; + nt->group_update_func = node_group_update; nt->type = NODE_CUSTOM_GROUP; register_node_type_cmp_custom_group(nt); -- cgit v1.2.3