Bug 376613 - Flatten doesn't affect file layers
Summary: Flatten doesn't affect file layers
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 3.1.2
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-18 13:45 UTC by Nathan GDquest
Modified: 2017-04-20 13:10 UTC (History)
0 users

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


Attachments
attachment-30403-0.html (2.24 KB, text/html)
2017-03-07 14:45 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan GDquest 2017-02-18 13:45:25 UTC
The "flatten" option is available when you right click on a file layer, but it doesn't modify it.

I would expect it to convert the file layer into a regular paint layer (for flexibility, in case you embed a document in another and realize you don't need to keep the reference eventually) or the option to be unavailable/grayed out.
Comment 1 Nathan GDquest 2017-03-07 10:40:23 UTC
(In reply to Nathan Lovato from comment #0)
> The "flatten" option is available when you right click on a file layer, but
> it doesn't modify it.

If you add a transform mask or any type of mask to the layer, it flattens as expected. The behavior is the same on both file and clone layers.
Comment 2 Dmitry Kazakov 2017-03-07 12:47:47 UTC
Hi, Nathan!

Could you answer one question? Do you also want Ctrl+E (Merge Down) 
shortcut to do flatten layer operation when possible?

Basically, it would mean that you will have to press Ctrl+E multiple 
times before merging down a layer with some masks/sublayers:

Step 1) Ctrl+E -> Flatten Layer
Step 2) Ctrl+E -> Merge Down

Just for you know, Ctrl+E shortcut already has some nice additions, 
like, when multiple layers are selected, it merges them instead for 
"merging down".

On 07.03.2017 13:40, Nathan Lovato wrote:
> https://bugs.kde.org/show_bug.cgi?id=376613
>
> --- Comment #1 from Nathan Lovato <nathan.lovato.art@gmail.com> ---
> (In reply to Nathan Lovato from comment #0)
>> The "flatten" option is available when you right click on a file layer, but
>> it doesn't modify it.
> If you add a transform mask or any type of mask to the layer, it flattens as
> expected. The behavior is the same on both file and clone layers.
>
Comment 3 Nathan GDquest 2017-03-07 13:27:14 UTC
(In reply to Dmitry Kazakov from comment #2)
> Could you answer one question? Do you also want Ctrl+E (Merge Down) 
> shortcut to do flatten layer operation when possible?
> 
> Basically, it would mean that you will have to press Ctrl+E multiple 
> times before merging down a layer with some masks/sublayers:
> 
> Step 1) Ctrl+E -> Flatten Layer
> Step 2) Ctrl+E -> Merge Down

Would it be possible to merge the steps? I.e. Ctrl E -> merge and if necessary, auto flatten. Otherwise, if the merge operation can do 2 different things (flatten or merge) depending on where you use it, plus there's still the flatten option, you're going to lose some people. I don't know about Gimp, but at least Affinity and PS flatten things for you when you use the merge function.
Comment 4 Nathan GDquest 2017-03-07 13:27:38 UTC
(Hi, and thank you for the quick reply :) )
Comment 5 Dmitry Kazakov 2017-03-07 14:45:13 UTC
Created attachment 104435 [details]
attachment-30403-0.html

I just checked how PS works:

1) If there is a group layer with children, then Ctrl+E shortcut is 
automatically **renamed** into "Merge group" and the action doesn't 
merge down, but merges the group
2) If there is a layer with masks, then Ctrl+E doesn't bake it, but 
works as usual, merges the layer down.

So I feel that Ctrl+E with should still flatten, but groups only. But 
for other types of layers, Ctrl+E should work as usual. And flatten 
would convert the layers into usual paint layers if applicable. What do 
you think about such idea?

On 07.03.2017 16:27, Nathan Lovato wrote:
> https://bugs.kde.org/show_bug.cgi?id=376613
>
> --- Comment #3 from Nathan Lovato <nathan.lovato.art@gmail.com> ---
> (In reply to Dmitry Kazakov from comment #2)
>> Could you answer one question? Do you also want Ctrl+E (Merge Down)
>> shortcut to do flatten layer operation when possible?
>>
>> Basically, it would mean that you will have to press Ctrl+E multiple
>> times before merging down a layer with some masks/sublayers:
>>
>> Step 1) Ctrl+E -> Flatten Layer
>> Step 2) Ctrl+E -> Merge Down
> Would it be possible to merge the steps? I.e. Ctrl E -> merge and if necessary,
> auto flatten. Otherwise, if the merge operation can do 2 different things
> (flatten or merge) depending on where you use it, plus there's still the
> flatten option, you're going to lose some people. I don't know about Gimp, but
> at least Affinity and PS flatten things for you when you use the merge
> function.
>
Comment 6 Nathan GDquest 2017-03-07 18:36:23 UTC
Ah yes, sorry for the lack of details. Sounds great :)

(In reply to Dmitry Kazakov from comment #5)
> Created attachment 104435 [details]
> attachment-30403-0.html
> 
> I just checked how PS works:
> 
> 1) If there is a group layer with children, then Ctrl+E shortcut is 
> automatically **renamed** into "Merge group" and the action doesn't 
> merge down, but merges the group
> 2) If there is a layer with masks, then Ctrl+E doesn't bake it, but 
> works as usual, merges the layer down.
> 
> So I feel that Ctrl+E with should still flatten, but groups only. But 
> for other types of layers, Ctrl+E should work as usual. And flatten 
> would convert the layers into usual paint layers if applicable. What do 
> you think about such idea?
> 
> On 07.03.2017 16:27, Nathan Lovato wrote:
> > https://bugs.kde.org/show_bug.cgi?id=376613
> >
> > --- Comment #3 from Nathan Lovato <nathan.lovato.art@gmail.com> ---
> > (In reply to Dmitry Kazakov from comment #2)
> >> Could you answer one question? Do you also want Ctrl+E (Merge Down)
> >> shortcut to do flatten layer operation when possible?
> >>
> >> Basically, it would mean that you will have to press Ctrl+E multiple
> >> times before merging down a layer with some masks/sublayers:
> >>
> >> Step 1) Ctrl+E -> Flatten Layer
> >> Step 2) Ctrl+E -> Merge Down
> > Would it be possible to merge the steps? I.e. Ctrl E -> merge and if necessary,
> > auto flatten. Otherwise, if the merge operation can do 2 different things
> > (flatten or merge) depending on where you use it, plus there's still the
> > flatten option, you're going to lose some people. I don't know about Gimp, but
> > at least Affinity and PS flatten things for you when you use the merge
> > function.
> >
Comment 7 Dmitry Kazakov 2017-04-20 12:42:43 UTC
Git commit 41b21156ae4f252b0457804dd719958f294bfd37 by Dmitry Kazakov.
Committed on 20/04/2017 at 11:43.
Pushed by dkazakov into branch 'krita/3.1'.

Convert file layers into paint layers on pressing "Flatten Layer"

Basically "Flatten Layer" is now a complete equivalent of
"Convert to Paint Layer"

M  +1    -1    libs/ui/kis_layer_manager.cc

https://commits.kde.org/krita/41b21156ae4f252b0457804dd719958f294bfd37
Comment 8 Dmitry Kazakov 2017-04-20 12:42:43 UTC
Git commit 2e4d3fe3aa54584529c0477ab6361bb917c59435 by Dmitry Kazakov.
Committed on 20/04/2017 at 12:02.
Pushed by dkazakov into branch 'krita/3.1'.

First try to flatten group layer, then merge down!

M  +20   -1    libs/ui/kis_layer_manager.cc

https://commits.kde.org/krita/2e4d3fe3aa54584529c0477ab6361bb917c59435
Comment 9 Dmitry Kazakov 2017-04-20 13:10:03 UTC
Git commit 86f9acbe37ace4b146d6fc72fd1317fd66962c24 by Dmitry Kazakov.
Committed on 20/04/2017 at 12:48.
Pushed by dkazakov into branch 'master'.

First try to flatten group layer, then merge down!

M  +20   -1    libs/ui/kis_layer_manager.cc

https://commits.kde.org/krita/86f9acbe37ace4b146d6fc72fd1317fd66962c24
Comment 10 Dmitry Kazakov 2017-04-20 13:10:03 UTC
Git commit b1bc292578f86ce4396c6a083c1ee1bb7139f317 by Dmitry Kazakov.
Committed on 20/04/2017 at 12:48.
Pushed by dkazakov into branch 'master'.

Convert file layers into paint layers on pressing "Flatten Layer"

Basically "Flatten Layer" is now a complete equivalent of
"Convert to Paint Layer"

M  +1    -1    libs/ui/kis_layer_manager.cc

https://commits.kde.org/krita/b1bc292578f86ce4396c6a083c1ee1bb7139f317
Comment 11 Dmitry Kazakov 2017-04-20 13:10:03 UTC
Git commit 00c433038a5ddac650b6173197ea9e49bed9f283 by Dmitry Kazakov.
Committed on 20/04/2017 at 12:48.
Pushed by dkazakov into branch 'master'.

Adjust "Merge with Layer Below"/"Merge Group" to switch text automatically

We should also hide "Flatten Layer" when a group is
selected, because it is a full equivalent of the other
action.

M  +8    -12   libs/ui/kis_layer_manager.cc
M  +0    -5    libs/ui/kis_node_manager.cpp
M  +0    -3    libs/ui/kis_node_manager.h
M  +0    -6    plugins/dockers/defaultdockers/kis_layer_box.cpp
M  +0    -1    plugins/dockers/defaultdockers/kis_layer_box.h

https://commits.kde.org/krita/00c433038a5ddac650b6173197ea9e49bed9f283