diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-20 21:25:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-24 13:44:27 +0300 |
commit | d730e512ac56bd68c75f8c44ff186b51010db4c7 (patch) | |
tree | dddf69daf78ac1627db7069ef3012b8ecb54017f /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 62421470ee09fb70f343eb9fd48b093316c8eea1 (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/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |