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 | |
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')
-rw-r--r-- | source/blender/editors/animation/drivers.c | 16 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 15 |
2 files changed, 16 insertions, 15 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); } } diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 13ff8c84b7a..0412ee89e51 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -832,20 +832,21 @@ short insert_keyframe (ID *id, bAction *act, const char group[], const char rna_ //} } #endif - - 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++) { fcu= verify_fcurve(act, group, rna_path, array_index, 1); - + /* insert keyframe */ - ret |= insert_keyframe_direct(ptr, prop, fcu, cfra, flag); + ret += insert_keyframe_direct(ptr, prop, fcu, cfra, flag); } - + return ret; } |