Is it possible to create new layer under the current layer instead of on top of current layer?

Hello, I’ve been using Krita since 2020 when I migrated to Linux and so far I’ve been loving it so much. :slight_smile:

I’ve been searching for ways to change the behavior of new layer created, to be created under my currently selected layer instead of on top of it. I’ve found no result about this (not even anyone asking about this particular feature), nor in the configuration settings in the Krita.

Is it possible to like, have shortcuts for both behaviors? My current new layer shortcut is N key. I was thinking it would be nice to have shortcuts for both behavior: new layer on top and new layer under.

But before that, does the feature to set this up exist to start with? If so, how can I access it?

Krita version: 5.0.0
OS: Linux Mint 20.1 x86_64

1 Like

You can grab a layer with your mouse or stylus and move it to every position in the stack you like.

Michelist

Add: If it is a locked layer, e.g. the lock-symbol is closed, then Krita creates a copy instead of moving the layer.

Yes I’ve been doing that manually. I wonder if there is a way to just set the new layer to be on top/ bottom automatically. For example, N key for new layer on top of current layer (default behavior) and Shift+N for new layer under the current layer.

If you put the focus on the layer below the layer where the new layer should be created under, won’t this be enough?

Michelist

ADD: So if you want the new layer below layer 4, put the focus on layer 3 before creating the new one.

2 Likes

There is a shortcut PageDown, which is called Activate previous layer in the shortcut setting to select the layer under, then press add new layer shortcut, maybe can do it faster for now?
Maybe Konayachi just want a faster workflow compare to what is now.

1 Like

If you put the focus on the layer below the layer where the new layer should be created under, won’t this be enough?

Actually, yes that is a good compromise for now. I’ll just see if I can move the layer focus around via keyboard. Thank you @Michelist :slight_smile:

There is a shortcut PageDown to select the layer under, then press add new layer shortcut, maybe can do it faster for now?

And you’ve answered my question right away. Many thanks @Lesqwe56 :slight_smile:
I’ll have to reassign the default shortcuts since my keyboard is on my left side, and my PageDown button is on the top right of the keyboard, which is not accessible for my work flow.

Maybe Konayachi just want a faster workflow compare to what is now.

Yes, I do. I wonder if it is a good feature to add to Krita in the future. I work from top layers to bottom layers, and having to reposition my new layer each time, hundreds of it, daily, all the time gets quite tedious for me. I was looking for faster workflow, as you said.

For now, I think all is good. Thank you everyone :smiley:

3 Likes

You can create a python script

from krita import *

def getNextSibling(node):
    previousNode=None
    for foundNode in node.parentNode().childNodes():
        if foundNode==node:
            return previousNode
        previousNode=foundNode
    return previousNode

doc=Krita.instance().activeDocument()
if doc:
    currentNode=doc.activeNode()
    if currentNode:
        newNode=doc.createNode("New paint layer", "paintlayer")
        currentNode.parentNode().addChildNode(newNode, getNextSibling(currentNode))

And use Ten Scripts plugin to affect a shortcut to execute the python script.

Grum999

8 Likes

Suggestion for a hypothetical shortcut:
“button+”(from docker layers) + ctrl or INS + ctrl makes a new layer under the selected layer. Or a single hotkey to do (like INS).
Previously I had suggested/requested a shortcut to push the layer to the top of the stack. This way: Button move layer (up / below) + ctrl sends the layers to the top or bottom.

1 Like

You can create a Krita action (script) that calls @Grum999’s script, in these Krita-action you can assign every shortcut you like to this action calling this script.

Michelist

2 Likes

Thank you for the script @Grum999 , I’ll try it out! :slight_smile:
And many thanks for the solutions too @mmiller (that shortcut to push the layer to the stop of the stack sounds so useful!) and @Michelist !

1 Like

Thanks for the script. But as @Konayachi said, it’s quite common to add new layers under actual layer.

I don’t know if below is more common than above as I don’t have official statistics about what is the most common way to do, but for softwares I know:
– In Gimp it’s above
– In MyPaint it’s above
– In ClipStudioPaint it’s above

I’m personally used to add above, it’s more logical to me :man_shrugging:

The script is a workaround solution, as I’m not sure developers will change anything on something like this; most of (old)(Krita) users might already be used to add their layers above from years now :sweat_smile:

Grum999

1 Like

As I use Clip Studio too, I meet… the same problem :slight_smile: But it bothers me in the two softwares. I colorize scanned drawings and I need to have original drawing layer above all the the new layer and it’s quite frustrating to begin with this manipulation. But I must admit that creating new layers above actual one is more logic. I suppose I am quite frustrated by this first manipulation before I begin to work.

I’ve made a few templates for my needs to start a painting with a sufficient layer stack of empty layers. Every time I ran out of layers, I create a new bunch of layers to “munch”. It is no solution, but it may help you.

Michelist

Thanks. I have to study how scripts work in Krita (in Clip Studio it’s quite simple to create such script).

I think you may have misinterpreted my post.
I create a file in a size I prefer, for you, the size of the scanned images would be what you want to start with. Then I create 10 or 20 empty layers, lock the background layer and safe this via “File” >> “Create Template from Picture” (again translated from German) as a template I can choose from now on in the new file dialog, every time I need a new canvas, and if I need more layers I put the focus to the wanted position in the stack and hit the new layer button (or call the shortcut) several times. No script magic, “real handicraft”. :wink:

Michelist

OK. Thanks. I think I will try a script :stuck_out_tongue_winking_eye:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.