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.
This commit is contained in:
Sergey Sharybin 2016-10-11 17:08:00 +02:00
parent 17603b9f01
commit 06215c71c0

@ -350,6 +350,10 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo
} }
offset = -min_coord - range / 2.0f; offset = -min_coord - range / 2.0f;
} }
else if (max_coord == min_coord) {
factor = 1.0f;
offset = -min_coord;
}
} }
BLI_assert(factor != 0.0f); BLI_assert(factor != 0.0f);
if (r_offset) { if (r_offset) {