Bug 435599 - Merging layer and Transform Mask gives back blank layer
Summary: Merging layer and Transform Mask gives back blank layer
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: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-04-11 00:27 UTC by Thomas P
Modified: 2021-05-20 11:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kra file with animated paint and transform layer I used (720.71 KB, application/x-krita)
2021-04-11 00:27 UTC, Thomas P
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas P 2021-04-11 00:27:06 UTC
Created attachment 137489 [details]
kra file with animated paint and transform layer I used

SUMMARY
5.0.0-prealpha-1222798f0a

In several versions of Krita 5 prealpha, when I have tried to merge a layer with a transform mask I get back a blank layer. If it is an animated layer I get back frames in the same place but nothing in each frame. 

This happens for 'Flatten Layer', 'Flatten Image' and 'Merge with Layer Below' involving an active transformation mask. Merging works as expected if the transformation mask is not visible or hasn't been moved to make a transformation during the merge.


STEPS TO REPRODUCE
1. Draw on a layer
2. Add a transform mask to the layer
3. Transform the layer using the transform mask (toggle on and off the layer to show the drawing again due to Bug 435296)
4. Merge the layer and transform mask together

OBSERVED RESULT
Layer becomes blank without any drawings from before the merge

EXPECTED RESULT
Layer and transform mask should merge together, drawings should be where they were transformed to with the transform mask before the merge.

SOFTWARE/OS VERSIONS
Windows: Windows 10

ADDITIONAL INFORMATION
Worked in 4.4.3, see this comment for another explanation: https://www.reddit.com/r/krita/comments/g3ri8b/animation_moving_multiple_frames_of_a_layer/fnu7hhn/
Comment 1 Ahab Greybeard 2021-04-12 09:35:43 UTC
I can confirm this, as described, for the Apr 11 5.0.0-prealpha (git 1222798) appimage.

It does not happen with the 4.4.3 appimage or the Apr 11 4.4.4-alpha(git 9180bae).

For the 5.0.0-prealpha, when the inage is opened thre transformed frame content displays correctly but disappears after a few seconds. it can be restored by clicking on any frame in the Timeline or by toggling the visibility of the transform mask. It then disappears again after a few seconds.
Comment 2 Eoin O'Neill 2021-04-12 20:26:43 UTC
Git commit 2edd4823e656cc0c4d3177aaeb8000165d1e1606 by Eoin O'Neill.
Committed on 12/04/2021 at 20:14.
Pushed by eoinoneill into branch 'master'.

Fixed two bugs regarding animated content and transforms.

1) Flattening a layer w/ transform content will now properly render out all keyframes
with proper transform (no more blanks).
2) Transform masks will always render properly on animated layers when there
are no keyframes on the transform mask, but there is content on the transformed layer.
There were certain circumstances where no projection update was applied at all, which
was not intended.
Related: bug 435296

M  +4    -0    libs/image/kis_layer_utils.cpp
M  +4    -2    libs/image/kis_recalculate_transform_mask_job.cpp

https://invent.kde.org/graphics/krita/commit/2edd4823e656cc0c4d3177aaeb8000165d1e1606
Comment 3 Dmitry Kazakov 2021-05-20 07:51:57 UTC
The fix for this bug causes a regression bug 436642
Comment 4 Dmitry Kazakov 2021-05-20 11:01:14 UTC
Git commit 348d57b23bffaca39c51e0b558460158c5e745c1 by Dmitry Kazakov.
Committed on 20/05/2021 at 11:00.
Pushed by dkazakov into branch 'master'.

Fix rendering of the final projection if the transform mask

There was a misprint in KisTransformMaskAdapter::transformDevice(),
which called a wrong function override.
Related: bug 435296, bug 436642

M  +1    -1    libs/image/kis_recalculate_transform_mask_job.cpp
M  +1    -1    plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp

https://invent.kde.org/graphics/krita/commit/348d57b23bffaca39c51e0b558460158c5e745c1