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:
authorJoshua Leung <aligorith@gmail.com>2009-11-05 11:54:33 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-05 11:54:33 +0300
commit63d6d6cb742ab741e91126e5055f3172f6dacad1 (patch)
treebe1e7a70ec11d5f9ffa4fb20a52fb5e9872f3db3 /source/blender/editors/animation/drivers.c
parentce973efd4f7c4ff85b1ff434154fde8ddf89530c (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.c16
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);
}
}