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:
authorCampbell Barton <ideasman42@gmail.com>2013-02-18 20:35:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-18 20:35:13 +0400
commit9ab3d4ff1eaacb8156043ac33bca7e9ac07806e6 (patch)
tree5a09f44a9c7b9487aecf6234eaf3f40e67813109 /source/blender/editors/animation/anim_draw.c
parent4cd487d731a69b1f6c4144eebec56a28e25cd201 (diff)
fix [#34303] Rotation fcurves don't work with transforming with individual centers
Diffstat (limited to 'source/blender/editors/animation/anim_draw.c')
-rw-r--r--source/blender/editors/animation/anim_draw.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index d83d1805f0e..eb1f5ef1043 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -399,20 +399,23 @@ float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short rest
static short bezt_unit_mapping_apply(KeyframeEditData *ked, BezTriple *bezt)
{
/* mapping factor is stored in f1, flags are stored in i1 */
- short only_keys = (ked->i1 & ANIM_UNITCONV_ONLYKEYS);
- short sel_vs = (ked->i1 & ANIM_UNITCONV_SELVERTS);
+ const bool only_keys = (ked->i1 & ANIM_UNITCONV_ONLYKEYS);
+ const bool sel_vs = (ked->i1 & ANIM_UNITCONV_SELVERTS);
+ const bool skip_knot = (ked->i1 & ANIM_UNITCONV_SKIPKNOTS);
float fac = ked->f1;
/* adjust BezTriple handles only if allowed to */
- if (only_keys == 0) {
- if ((sel_vs == 0) || (bezt->f1 & SELECT))
+ if (only_keys == false) {
+ if ((sel_vs == false) || (bezt->f1 & SELECT))
bezt->vec[0][1] *= fac;
- if ((sel_vs == 0) || (bezt->f3 & SELECT))
+ if ((sel_vs == false) || (bezt->f3 & SELECT))
bezt->vec[2][1] *= fac;
}
- if ((sel_vs == 0) || (bezt->f2 & SELECT))
- bezt->vec[1][1] *= fac;
+ if (skip_knot == false) {
+ if ((sel_vs == false) || (bezt->f2 & SELECT))
+ bezt->vec[1][1] *= fac;
+ }
return 0;
}