[Bf-blender-cvs] [06215c7] master: Fix T49629: Graph editor normalize function doesn't work on f-curves with a constant key value
Sergey Sharybin
noreply at git.blender.org
Tue Oct 11 17:08:43 CEST 2016
Commit: 06215c71c075369c4910dfbe11b35e5ed176bc22
Author: Sergey Sharybin
Date: Tue Oct 11 17:08:00 2016 +0200
Branches: master
https://developer.blender.org/rB06215c71c075369c4910dfbe11b35e5ed176bc22
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.
===================================================================
M source/blender/editors/animation/anim_draw.c
===================================================================
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index f8b98eb..33e44d7 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) {
More information about the Bf-blender-cvs
mailing list