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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-10-11 18:08:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-10-11 18:08:00 +0300
commit06215c71c075369c4910dfbe11b35e5ed176bc22 (patch)
treef245a476a5d5cf385179c34728cfdad43a05986f /source/blender/editors/animation
parent17603b9f01ca1d70b327a6b81d9a751b510a7f04 (diff)
Fix T49629: Graph editor normalize function doesn't work on f-curves with a constant key value
Technically it is a regression in behavior and should be 2.78a.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_draw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index f8b98ebb8b7..33e44d73894 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -350,6 +350,10 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo
}
offset = -min_coord - range / 2.0f;
}
+ else if (max_coord == min_coord) {
+ factor = 1.0f;
+ offset = -min_coord;
+ }
}
BLI_assert(factor != 0.0f);
if (r_offset) {