Bug 478966 - Krita transform mask moves initial position of a tween curve (Nightly git master build (git dfe4f31))
Summary: Krita transform mask moves initial position of a tween curve (Nightly git mas...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-24 12:15 UTC by sarokes471
Modified: 2024-02-28 18:09 UTC (History)
2 users (show)

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


Attachments
What krita does on my machine with calculating transform mask curves. (2.71 MB, video/mp4)
2023-12-24 12:15 UTC, sarokes471
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sarokes471 2023-12-24 12:15:20 UTC
Created attachment 164423 [details]
What krita does on my machine with calculating transform mask curves.

This is NOT a crash, but rather the transform mask screws up the initial position of a tween curve after its done calculating. The ending position is fine, but it moves the initial position ruining it in the process.

Watch the included video and follow along.

OBSERVED RESULT
The animated tween curve gets ruined by moving or resizing the initial position.

EXPECTED RESULT
Not doing what it actually is doing.

I only tested this on windows 11, not on GNU/Linux.

ADDITIONAL INFORMATION
None that I can add anymore.
Comment 1 lenoto7276 2023-12-29 18:19:07 UTC
Hey, I tested this on debian with the nightly appimage, is this small snippet that appears in the output terminal normal?

SAFE ASSERT (krita): "mergeResult" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp, line 126
SAFE ASSERT (krita): "mergeResult" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp, line 126
SAFE ASSERT (krita): "mergeResult" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp, line 126
SAFE ASSERT (krita): "mergeResult" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp, line 126
SAFE ASSERT (krita): "mergeResult" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp, line 126
SAFE ASSERT (krita): "mergeResult" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp, line 126

Because I (sometimes) get it. It's not very consistent if it does the transform mask properly. Sometimes it works flawlessly and sometimes it does a terrible job at it.
Comment 2 Dmitry Kazakov 2024-01-10 09:23:07 UTC
Hi, sarokes471!

I'm working on the fix now. Before the fix is implemented you can use the follwoing workaround when creating an animated transform mask:

1) Create a transform mask
2) Activate a Transform Tool on this mask, make sure that you see tool handles.
3) Without any transformations, press Enter key. That will save a properly initialized data into the transform mask
4) Now you can create the first keyframe in the transform mask and it will behave correctly

If the solution doesn't work, try adding a small translation transformation at step 2 to make sure the mask doesn't take any identity optimization path.

I will work on a proper fix in the meantime.
Comment 3 Dmitry Kazakov 2024-01-10 10:40:46 UTC
Git commit b034513065a7f7a1001cb7626904d7a4c10dfb9a by Dmitry Kazakov.
Committed on 10/01/2024 at 11:37.
Pushed by dkazakov into branch 'master'.

Fix transform mask offsets after running a transform tool on that

When args.originalCenter() changes (due to transform mask initialization
or a change in the parent layer) we should update all the channel to take
these changes into account. Our transformation in the transform mask is
actually **relative** even though we store absolute offsets in the mask.

M  +24   -2    plugins/tools/tool_transform2/KisAnimatedTransformMaskParamsHolder.cpp

https://invent.kde.org/graphics/krita/-/commit/b034513065a7f7a1001cb7626904d7a4c10dfb9a
Comment 4 Dmitry Kazakov 2024-01-10 10:42:15 UTC
Hi, Sarokes and Lenoto!

I have just pushed a fix and started the nightly builds, please check when they are ready:

https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/2341/
https://binary-factory.kde.org/job/Krita_Nightly_Appimage_Build/2249/
Comment 5 Dmitry Kazakov 2024-02-28 18:09:49 UTC
Git commit 09eef580b009e2bc5563fe1101d1c67ab1a89992 by Dmitry Kazakov.
Committed on 28/02/2024 at 12:52.
Pushed by dkazakov into branch 'kazakov/for-5.2'.

Fix transform mask offsets after running a transform tool on that

When args.originalCenter() changes (due to transform mask initialization
or a change in the parent layer) we should update all the channel to take
these changes into account. Our transformation in the transform mask is
actually **relative** even though we store absolute offsets in the mask.

M  +24   -2    plugins/tools/tool_transform2/KisAnimatedTransformMaskParamsHolder.cpp

https://invent.kde.org/graphics/krita/-/commit/09eef580b009e2bc5563fe1101d1c67ab1a89992