diff options
author | Ichthyostega <prg@ichthyostega.de> | 2016-08-22 18:22:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-23 12:53:35 +0300 |
commit | 3dbe1744402c2790d7854f09cf977bb275436479 (patch) | |
tree | 74e27ddbcfe858e71ec47908d5d9b44aee6b5ef0 /source/blender/blenloader | |
parent | 95d3ca8bc68c85643b9ce6b7340e2e1f48224fc2 (diff) |
2D stabilization: flip orientation of the scale parameter
values > 1 will zoom in and values < 1 zoom out
Rationale: the changed orientation is more natural
from a user POV and doing it this way is also more
consistent with the calculation of the other
target_* parameters.
Compatibility: This will break *.blend files saved
with the previous version of this patch from the
last days (test period). It will *not* break any
old/migrated files: Previously, the DNA field "scale"
was only used to cache autoscale. Only with the
Stabilisator rework, "scale" becomes a first class
persistent DNA field. There is migration code to
init this field to 1.0
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index f6ac42c1941..1ef32d6f006 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -91,9 +91,6 @@ static void migrate_single_rot_stabilization_track_settings(MovieTrackingStabili } } stab->rot_track = NULL; /* this field is now ignored */ - - /* by default show the track lists expanded, to improve "discoverability" */ - stab->flag |= TRACKING_SHOW_STAB_TRACKS; } static void do_version_constraints_radians_degrees_270_1(ListBase *lb) @@ -1369,13 +1366,17 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) for (clip = main->movieclip.first; clip != NULL; clip = clip->id.next) { if (clip->tracking.stabilization.rot_track) { migrate_single_rot_stabilization_track_settings(&clip->tracking.stabilization); - if (!clip->tracking.stabilization.scale) { - /* ensure init. - * Was previously used for autoscale only, - * now used always (as "target scale") */ - clip->tracking.stabilization.scale = 1.0f; - } } + if (clip->tracking.stabilization.scale == 0.0f) { + /* ensure init. + * Was previously used for autoscale only, + * now used always (as "target scale") */ + clip->tracking.stabilization.scale = 1.0f; + } + /* by default show the track lists expanded, to improve "discoverability" */ + clip->tracking.stabilization.flag |= TRACKING_SHOW_STAB_TRACKS; + /* deprecated, not used anymore */ + clip->tracking.stabilization.ok = false; } } } |