diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-12-22 07:38:56 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-12-22 07:50:34 +0300 |
commit | 9f34f2b20d558817f800a239896cccf19a926204 (patch) | |
tree | 609bb9914bc802185adccc1313b63839c02b5af6 /source/blender/blenloader/intern/versioning_290.c | |
parent | ffacce5be41df68658f8478fee73e74701d2b545 (diff) |
VSE: Fix animation versioning for bezier F-curves
`seq_convert_transform_animation()` converted only keyframed value, but
when bezier interpolation is used, posotion of handles was unchanged.
This caused significant difference in animation.
I have checked only linear interpolation when testing versioning originally.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 0c64e835e8b..8a85278a931 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -113,7 +113,9 @@ static void seq_convert_transform_animation(const Scene *scene, BezTriple *bezt = fcu->bezt; for (int i = 0; i < fcu->totvert; i++, bezt++) { /* Same math as with old_image_center_*, but simplified. */ + bezt->vec[0][1] = image_size / 2 + bezt->vec[0][1] - scene->r.xsch / 2; bezt->vec[1][1] = image_size / 2 + bezt->vec[1][1] - scene->r.xsch / 2; + bezt->vec[2][1] = image_size / 2 + bezt->vec[2][1] - scene->r.xsch / 2; } } } @@ -250,7 +252,9 @@ static void seq_convert_transform_animation_2(const Scene *scene, BezTriple *bezt = fcu->bezt; for (int i = 0; i < fcu->totvert; i++, bezt++) { /* Same math as with old_image_center_*, but simplified. */ + bezt->vec[0][1] *= scale_to_fit_factor; bezt->vec[1][1] *= scale_to_fit_factor; + bezt->vec[2][1] *= scale_to_fit_factor; } } } |