File Layers and Alpha Inheritance

Is it possible to use alpha inheritance on a file layer?

I was working on a file where I was using a large texture on multiple layers, and things slowed down fast. I realized I could export the texture out, import it as a file layer and toggle alpha inheritance - it worked!

A few weeks later, with Krita updated, I figure I could do the same thing in a different file where this trick would save me from a lot of slowdown. This time it didn’t work – clicking on the alpha symbol returned nothing, neither did the keyboard shortcut I have set for alpha inheritance.

I go back to the aformentioned file and curiously enough the alpha inheritance is still toggled on, but this time I’m currently unable to toggle it off.

I tried 4.4.3 Beta 2 and 4.4.3 Beta 1 and 4.4.2 but they’re all locking me out from toggling file layers - so originally I figured this was a change in 4.4.3 but now I can’t think what allowed me to do it in the first place.

Wondering if anyone can help shed a light on this - this would be a great feature for me to take advantage of.

Many thanks!

For clarification, which version were you using when you were able to use alpha inheritance on a file layer?

Can you provide that .kra file using a link to a file sharing service?

Thanks for the quick reply!

Unfortunately I can’t share the original file for NDA reasons, but I was able to remove the copyrighted artworks with the toggled-on inheritance layer intact. Hoping that can be of use?

https://www.dropbox.com/s/mvurgc6ioe3z4xh/example.kra?dl=1

Can’t 100% confirm the version used, but the original file was saved March 18th this year and I generally keep Krita updated to the latest beta, which would put it at 4.4.3 Beta 2.

1 Like

Useful tip: When using a dropbox link, edit it so the ending says " …dl=1"
That will give direct download instead of going via the website and its attempt to sign people up.

I can’t remove the alpha inheritance setting on your file layer (even if I replace the missing file).

Also, starting from new, I can’t put alpha inheritance on a file layer with 4.4.3 or earlier versions.

This is a mystery and one for the developers to look at.

Thanks for the tip.

Glad to hear it’s not just me then.

Hi

On my side it’s working… :thinking:
Or we’re talking about different things?

Note: to be able to apply alpha inheritance on a file layer, the file layer must have a transparent background…

Grum999

Downloaded the file

I have this message, because i don’t have the external file used for file layer

But the message indicate me that external image is a JOEG file.
JPEG don’t have transparency
Then, that’s why alpha inheritance don’t work…

Grum999

:thinking:
I just realized that in your case, the file layer is inverted…

Grum999

@Grum999
In your video, you set/unset alpha inheritance on a paint layer, not a file layer.

I’ve just tried it again with a file layer that has transparency, both .png and .kra and I can’t set alpha inheritance on the file layer.

Yes I realized that my case wasn’t exactly the same than one described by @louis
I didn’t read carefully :slight_smile:

It seems alpha inheritance functionality is disabled on file layers.
Looking back on Krita 4.1.7 and 4.2.8, it seems alpha inheritance can’t be applied on a file layer… It’s not a 4.4.x regression.
So I’m not sure to determinate how it was possible to apply it on Krita document (except going in zip file to modify property… :man_shrugging:)

Anyway, even if modifying the alpha inheritance is not possible on a file filer through UI, when it’s activated like here, the alpha inheritance is applied properly…

Grum999

I simulated this by falsifying the ‘channel flags’ entry for the layer:

Strange

The file layer in the .kra file from @louis has this entry as well.

Here is my falsified .kra file:
https://www.dropbox.com/s/8cang5022whx2u8/AhabNewAI.kra?dl=1

I’ve no idea how @louis got into this situation.

1 Like

Thanks for all the help. My workflow is really just painting and occasionally adjusting HSL, never would have touched channels for a layer.

Can’t think how I managed it – a shame that it appears to be technically possible, but is otherwise not a feature of file layers.

I don’t know why it’s deactivated for file layer.
Bug ?
Intentional ? In this case there’s might be a good reason I imagine.
Basically, it’s not possible to draw on a file layer and maybe this one reason why it’s deactivated. Other possibility is maybe, activating it generate other bugs… :man_shrugging:

Only a développer can provide us an answer…

Grum999

@Grum999
As far as I can tell, alpha inheritance doesn’t affect the content of a layer or the operations on it. It affects the projection/composition of the layer.
As such, it seems reasonable that you could have alpha inheritance on a file layer.
However, as you say, there may be a good reason why you can’t.

@louis
There may have been a strange glitch that allowed this to happen. We’ll probaby never know.

@louis Getting back to your problem - there’s always a workaround :slight_smile:

1 Like

Yes, but I was more thinking about the “usual” usage of this functionality (for me, draw on the layer and keep alpha from stack)

Testing to set alpha inherit throiugh scripting, and that’s Ok, can change value file layer :slight_smile:

from krita import *

node=Krita.instance().activeDocument().nodeByName('File Layer 1')
node.setInheritAlpha(True)
print(node.inheritAlpha())

Also, found how to change it through UI :smiley:

  1. Select at least a paint layer with file layer and right click=>properties
  2. Uncheck “alpha”

    Then, in layer stack, both layer inherits alpha

This tip can be used to activate/deactivate the inherit alpha on a file layer…

I tried to look in Krita source code, but I’m not able to find/understand where/how the icon is managed :slight_smile:

Grum999

The level of strangeness has just increased. Which version are you using?
With the 4.4.3 appimage, I get this if I do that selection and look at properties:

I get the properties display you show if I select only a paint layer.

channelflags=1110 is what you can use to enable inherit alpha on a file layer. Does that correspond to RGBA = 1110?
It shouldn’t do that.

Very weird!

I’m also using AppImage 4.4.3! :sweat_smile:
But I’ve took a look on a 4.2.8, I already have the channels in layer properties…
Absolutely no idea why you don’t have it…

Also tested 4.4.2 on windows, I have it too…

Yes

Clicking on “alpha channel” through the property window seems to be exclusive with “Inherit alpha” property.

Grum999

Small video of what happening

Grum999

Ok I think I understand why you don’t have it:
image
Colour space and profile are not the same on all selected layers :slight_smile:

Grum999

2 Likes