diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-17 17:10:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-17 17:10:29 +0300 |
commit | 733b77063c11919f1c111254b02294558e7ef016 (patch) | |
tree | 9cf0dce03e6868770f1771ec2a062915d9aeb5f3 /source | |
parent | 64104524cc4e1677deed601c265c992fa494423c (diff) |
was trying to add one too many drivers when inserting them on all items on an array (own error)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/animation/drivers.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index ac2eec6fd21..0c2fa0878be 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -160,7 +160,7 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla /* key entire array convenience method */ if (array_index == -1) { array_index= 0; - array_index_max= RNA_property_array_length(&ptr, prop) + 1; + array_index_max= RNA_property_array_length(&ptr, prop); } /* will only loop once unless the array index was -1 */ diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 084b5fcd271..01b7b9cd353 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1781,7 +1781,7 @@ int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, co int RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr) { *r_ptr= *ptr; - return ((r_ptr->type = prop->srna)); + return ((r_ptr->type = prop->srna) ? 1:0); } int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, RawArray *array) |