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>2010-01-26 12:25:32 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-26 12:25:32 +0300
commit0e1eca2d08035a24067406167aa5cdea0b16d274 (patch)
tree181af1578c718a52cc3713533eaa2640a8360707 /source/blender/editors/space_graph/graph_edit.c
parent3150e4ee12ed6fbe6e9f60d013a6d43c85cca8ce (diff)
Finishing off the Transform code changes for Degrees/Radians:
Added flags for the mapping function offering more control over what values were affected and when. In the WIP code, the values for unselected verts were getting the restoration conversion being repeatedly applied, resulting in the values tending to zero.
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 9842d2ae9ae..00951db61d3 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1574,7 +1574,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *op)
AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
/* apply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, 0, 1);
+ ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -1585,7 +1585,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *op)
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
/* unapply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, 1, 1);
+ ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|ANIM_UNITCONV_ONLYKEYS);
}
BLI_freelistN(&anim_data);
@@ -1667,7 +1667,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* apply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 0, 0);
+ ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 0);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -1678,7 +1678,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
/* apply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 1, 0);
+ ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE);
}
BLI_freelistN(&anim_data);
@@ -1791,7 +1791,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
AnimData *adt= ANIM_nla_mapping_get(ac, ale);
/* apply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 0, 1);
+ ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
@@ -1802,7 +1802,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
/* unapply unit corrections */
- ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, 1, 1);
+ ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYKEYS|ANIM_UNITCONV_RESTORE);
}
BLI_freelistN(&anim_data);