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@pandora.be>2013-09-11 00:26:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-11 00:26:34 +0400
commit734eaab54542644f6a031858b4ca280cd565dc6a (patch)
tree9daef15ae823f2a13b73ac13d9f650614aa65a1f /source/blender/makesrna/intern/rna_access.c
parent92d94ccb084df36ab7fd39f0258a7189356d9966 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index e935ff285b1..11323779b85 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -49,6 +49,7 @@
#include "BKE_context.h"
#include "BKE_idcode.h"
#include "BKE_idprop.h"
+#include "BKE_fcurve.h"
#include "BKE_main.h"
#include "BKE_report.h"
@@ -1512,14 +1513,24 @@ bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
return (prop->flag & PROP_EDITABLE) != 0;
}
-bool RNA_property_animated(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop))
+bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
{
- /* would need to ask animation system */
+ int len = 1, index;
+ bool driven;
+
+ if (!prop)
+ return false;
+
+ 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))
+ return true;
return false;
}
-
/* this function is to check if its possible to create a valid path from the ID
* its slow so don't call in a loop */
bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop)