Bug 450781 - Transform mask animations don't work after scaling image down.
Summary: Transform mask animations don't work after scaling image down.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 5.0.2
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Eoin O'Neill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-24 02:27 UTC by yockeyjim@yahoo.com
Modified: 2022-04-12 05:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Mis-aligned image on later frame. (235.63 KB, image/png)
2022-02-24 02:27 UTC, yockeyjim@yahoo.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yockeyjim@yahoo.com 2022-02-24 02:27:02 UTC
Created attachment 147093 [details]
Mis-aligned image on later frame.

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

I'm on Windows 10, using Krita to make an animation.
The animation uses animated transform masks.
I'm trying to reduce the size and scale down the image to animate faster.
When scaling down using "Scale Image to New Size" transform masks seemed mis-aligned.
But, I looked through previous frames, and the first frame looked correct.
The transform masks no longer animated at all.

STEPS TO REPRODUCE
1. Create an extra layer with transform masks.
2. Keep a non-transformed layer as reference
3. Animate the transform mask.
4. Scale to new size: 50%.

OBSERVED RESULT
The transformed layers no longer animate properly. They don't move at all. However, they align properly on the first frame.

EXPECTED RESULT
The transformed layers should look the same, other than being at a lower scale, like everything else.

SOFTWARE/OS VERSIONS
I'm using Windows 10

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2022-02-24 19:43:56 UTC
I can Confirm this for the 5.0.2 and the Feb 24 5.1.0-prealpha (git 96871c7) appimages on Debian 10.

After scaling, the animated transform mask is identical, as seen in the Animation Curved docker but it does not work.
You can add control points but they have no effect

A Duplicate of the animated transform mask has no content.

After Saving and re-Opening, the animated transform mask has no content and if you try to create a control point, all parameters are Zero.
If you use the Transform Tool to move the location of a frame, there is no response in the transform mask Animation Curves docker.

A newly made animated transform mask behaves normally.
Comment 2 Eoin O'Neill 2022-02-24 23:18:59 UTC
Git commit 069dd6baa083c21d9dd8960da4af73aab7efc3c3 by Eoin O'Neill.
Committed on 24/02/2022 at 23:15.
Pushed by eoinoneill into branch 'master'.

We now prevent data loss when scaling an image w/ animated transform masks.

The ideal long-term fix would be to modify transform
mask keyframes to account for new image size. When the image size changes, positioning
data should change to reflect new image sizing.

For now, this is enough to at least prevent data loss.

M  +1    -1    libs/image/processing/kis_transform_processing_visitor.cpp
M  +12   -0    plugins/tools/tool_transform2/kis_animated_transform_parameters.cpp

https://invent.kde.org/graphics/krita/commit/069dd6baa083c21d9dd8960da4af73aab7efc3c3
Comment 3 Eoin O'Neill 2022-04-12 05:33:29 UTC
Git commit 11ca47e723492925588ff34800aa25e8a04cbf41 by Eoin O'Neill.
Committed on 12/04/2022 at 05:29.
Pushed by eoinoneill into branch 'krita/5.0'.

We now prevent data loss when scaling an image w/ animated transform masks.

The ideal long-term fix would be to modify transform
mask keyframes to account for new image size. When the image size changes, positioning
data should change to reflect new image sizing.

For now, this is enough to at least prevent data loss.
(cherry picked from commit 069dd6baa083c21d9dd8960da4af73aab7efc3c3)

M  +1    -1    libs/image/processing/kis_transform_processing_visitor.cpp
M  +12   -0    plugins/tools/tool_transform2/kis_animated_transform_parameters.cpp

https://invent.kde.org/graphics/krita/commit/11ca47e723492925588ff34800aa25e8a04cbf41