diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-10-11 18:08:00 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-10-19 15:26:40 +0300 |
commit | 8ebc7565e7f7bd3e87721e6ee9f20455869b8b5a (patch) | |
tree | 6add51e1359b672f9e3edd5747fe14c3f92a5cb0 | |
parent | 012bbce453efdd644b90a239963d252d46385f0c (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.
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 4 |
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) { |