diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-11-05 11:54:33 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-11-05 11:54:33 +0300 |
commit | 63d6d6cb742ab741e91126e5055f3172f6dacad1 (patch) | |
tree | be1e7a70ec11d5f9ffa4fb20a52fb5e9872f3db3 /source/blender/editors/animation/drivers.c | |
parent | ce973efd4f7c4ff85b1ff434154fde8ddf89530c (diff) |
Armature Editing Bugfixes:
* #19790: Circle Select doesn't work for Armature edit mode or pose mode
* Duplicate bones (Shift-D) was calling the wrong operator. This now uses the macro version, instead of the copy only.
Diffstat (limited to 'source/blender/editors/animation/drivers.c')
-rw-r--r-- | source/blender/editors/animation/drivers.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 5442598a261..5c2cbce4c5d 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -156,17 +156,17 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla return 0; } - if(array_index==-1) { /* Key All */ + /* key entire array convenience method */ + if (array_index == -1) { array_index= 0; array_index_max= RNA_property_array_length(&ptr, prop) + 1; } - + /* will only loop once unless the array index was -1 */ - for( ; array_index < array_index_max; array_index++) { - + for (; array_index < array_index_max; array_index++) { /* create F-Curve with Driver */ fcu= verify_driver_fcurve(id, rna_path, array_index, 1); - + if (fcu && fcu->driver) { fcu->driver->type= type; @@ -181,19 +181,19 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla if (proptype == PROP_BOOLEAN) { if (!array) val= RNA_property_boolean_get(&ptr, prop); else val= RNA_property_boolean_get_index(&ptr, prop, array_index); - + BLI_strncpy(expression, (val)? "True": "False", maxlen); } else if (proptype == PROP_INT) { if (!array) val= RNA_property_int_get(&ptr, prop); else val= RNA_property_int_get_index(&ptr, prop, array_index); - + BLI_snprintf(expression, maxlen, "%d", val); } else if (proptype == PROP_FLOAT) { if (!array) fval= RNA_property_float_get(&ptr, prop); else fval= RNA_property_float_get_index(&ptr, prop, array_index); - + BLI_snprintf(expression, maxlen, "%.3f", fval); } } |