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:
authorCampbell Barton <ideasman42@gmail.com>2013-09-16 05:35:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-16 05:35:52 +0400
commitabb37f4152ea8945fdffdc956acdd3002e54db2d (patch)
tree0e8200b6bb31654553b52e24e22a49ca1ed5c98a /source/blender/editors/animation
parent7e2977b051d6aecd8effe89f11db5373bc0dc3b1 (diff)
replace RNA_property_array_length with RNA_property_array_check where the length of the array is only used to check if the property is an array or not.
(this isnt reliable since arrays can be zero length).
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c2
-rw-r--r--source/blender/editors/animation/keyframing.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 21941c7ed62..d3e6d8f474f 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -132,7 +132,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
propname = RNA_property_ui_name(prop);
/* Array Index - only if applicable */
- if (RNA_property_array_length(&ptr, prop)) {
+ if (RNA_property_array_check(prop)) {
char c = RNA_property_array_item_char(prop, fcu->array_index);
/* we need to write the index to a temp buffer (in py syntax) */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index cfc03050a9e..70361f00004 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -508,19 +508,19 @@ static float setting_get_rna_value(PointerRNA *ptr, PropertyRNA *prop, int index
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
value = (float)RNA_property_boolean_get_index(ptr, prop, index);
else
value = (float)RNA_property_boolean_get(ptr, prop);
break;
case PROP_INT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
value = (float)RNA_property_int_get_index(ptr, prop, index);
else
value = (float)RNA_property_int_get(ptr, prop);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_check(prop))
value = RNA_property_float_get_index(ptr, prop, index);
else
value = RNA_property_float_get(ptr, prop);