Bug 412926

Summary: Flattening a fill layer to apply a mask converts it to a regular paint layer.
Product: [Applications] krita Reporter: Ian S <xcausex>
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: minor CC: ahab.greybeard, ghevan
Priority: NOR    
Version First Reported In: 4.2.7   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ian S 2019-10-13 22:09:45 UTC
If you add a transparency or filter mask to a fill layer and then choose to flatten that layer, it will convert it to a regular paint layer instead of keeping it as a fill layer. This may affect other masks as well, but they didn't seem relevant to fill layers.


STEPS TO REPRODUCE
1. Add a fill layer.
2. Add a mask to that layer.
3. Flatten that layer.

OBSERVED RESULT

It converts the fill layer to a paint layer.

EXPECTED RESULT

It should remain a fill layer after the flattening operation.
Comment 1 Ahab Greybeard 2019-10-14 13:07:11 UTC
A Fill layer is a simple repeated copy of a single colour pixel or a Pattern chosen from the available patterns.
If you apply a transparency or filter mask, the rendered result can't be represented by a Fill layer so the result after flattening has to be a paint layer.
Comment 2 Ahab Greybeard 2019-10-14 13:17:41 UTC
Re-thinking this for the case of a transparency mask, an applied transparency mask could be 'applied' by multiplication onto the Fill layer's built in transparency mask.
Comment 3 vanyossi 2019-10-15 01:38:43 UTC
This is already supported and covers the use case you are describing

To add the transparency information to the fill mask:
- right click on the mask
- Split Alpha > Write as alpha

Fill layer will remain as fill layer.

Flatten layer is designed to "apply" a layer projection an make it a pixel layer.
Comment 4 Ian S 2019-10-15 08:43:10 UTC
(In reply to vanyossi from comment #3)
> This is already supported and covers the use case you are describing
> 
> To add the transparency information to the fill mask:
> - right click on the mask
> - Split Alpha > Write as alpha
> 
> Fill layer will remain as fill layer.
> 
> Flatten layer is designed to "apply" a layer projection an make it a pixel
> layer.

Ya, the write to alpha option is what I ended up finding as a solution, but -tiar- from the subreddit suggested I file it as a bug anyhow, since write to alpha was not at all intuitive in comparison to flattening the layer, took us a while to find that.