From 734eaab54542644f6a031858b4ca280cd565dc6a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 10 Sep 2013 20:26:34 +0000 Subject: Fix #36327: cycles render layers exclude layers animation did not work well. This is kind of another way to animate layers which is disabled, but add an exception to make this case work. --- .../blender/nodes/composite/node_composite_tree.c | 30 +++++----------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 0b62481b2f7..31ae46468c3 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -318,38 +318,22 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node) lb = RNA_struct_type_properties(ptr.type); for (link = lb->first; link; link = link->next) { - int len = 1, index; - bool driven; prop = (PropertyRNA *)link; - if (RNA_property_array_check(prop)) - len = RNA_property_array_length(&ptr, prop); - - for (index = 0; index < len; index++) { - if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) { - nodeUpdate(ntree, node); - return 1; - } + if (RNA_property_animated(&ptr, prop)) { + nodeUpdate(ntree, node); + return 1; } } /* now check node sockets */ for (sock = node->inputs.first; sock; sock = sock->next) { - int len = 1, index; - bool driven; - RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr); prop = RNA_struct_find_property(&ptr, "default_value"); - if (prop) { - if (RNA_property_array_check(prop)) - len = RNA_property_array_length(&ptr, prop); - - for (index = 0; index < len; index++) { - if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) { - nodeUpdate(ntree, node); - return 1; - } - } + + if (RNA_property_animated(&ptr, prop)) { + nodeUpdate(ntree, node); + return 1; } } -- cgit v1.2.3