Bug 438397 - Colorize mask layer is placed over the lineart layer when it's converted to paint layer.
Summary: Colorize mask layer is placed over the lineart layer when it's converted to p...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Colorize (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-10 10:24 UTC by acc4commissions
Modified: 2021-07-21 07:43 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description acc4commissions 2021-06-10 10:24:15 UTC
SUMMARY
5.0 prealpha git c4e3b84

Title pretty much says it all.
It should be below the original layer after being converted.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 acc4commissions 2021-06-10 10:31:36 UTC
No, I found out that this is not limited to colorize mask. All 'mask' layers behave this way.
Comment 2 Ahab Greybeard 2021-06-11 09:24:01 UTC
I can confirm this for the colourise mask with the Jun 10 5.0.0-prealpha (git 7ae3f95) appimage on Debian 10.

With the 4.4.5 and earler appimages, it is placed below the layer to which it was initially applied, as it should be. Hence regression.

For the transparency mask and filter mask, these have always been placed above the layer they were attached to after conversion to a paint layer.
However, if a paint layer is converted to a transparency mask or filter mask, then it is applied to the layer above it (unless there is no layer above, in which case it is appled to the layer below).

It does seem more 'logical' that a transparency/filter mask that is converted to a paint layer would stay in the same position, i.e. under the layer it was initially applied to.

For the transform mask, the option to convert to a paint layer is not greyed out but it has no effect if clicked.
Comment 3 Dmitry Kazakov 2021-07-21 06:58:02 UTC
The regression is caused by 424e41cf211d6953aef3e44fb8b11f1b8893e5db, which removed a lot of specific logic for colorize masks.
Comment 4 Dmitry Kazakov 2021-07-21 07:43:09 UTC
Git commit 672de3752b156d933d4be8829b8a24a1834e1fb5 by Dmitry Kazakov.
Committed on 21/07/2021 at 07:43.
Pushed by dkazakov into branch 'master'.

Fix positioning on mask after converting them into paint layers

1) Colorize masks should be put either below or above the parent layer,
   depending on their blending mode.
2) Normal masks should be put below the parent layer
3) Layers should be put into the same position where they were

M  +24   -5    libs/image/kis_layer_utils.cpp

https://invent.kde.org/graphics/krita/commit/672de3752b156d933d4be8829b8a24a1834e1fb5