move object from transparent layer changes opacity

Post questions on how to use or achieve an effect in Inkscape.
Zom-B
Posts: 15
Joined: Tue May 08, 2012 12:06 am

move object from transparent layer changes opacity

Postby Zom-B » Fri Nov 16, 2012 9:52 pm

I'm trying to move an object from a transparent layer to an opaque layer. In my expectation the object should become fully opaque as if the object was created in that layer instead.

For example:
Create an design with two layers,
Set the transparency of the top layer to 40%,
Draw a circle of 40x40mm in each layer, not overlapping
select the circle that appears transparent because of the transparent layer,
Press Shift+PgDn,

Expected: Two circles in the bottom layer that look exactly the same.

Actual behavior: The circle that moved to the bottom layer suddenly has 40% opacity, and looks as if not moved between layers.

The behavior is actually adopting the source layer's blending mode, of which opacity is just a parameter (see #233803). Looking in the SVG, I see the object is not only moved, but a filter is added to the style property (display:inline;filter:url(#filter14563)), and a new filter definition added to the header under <defs>.

This behavior is not what I want, as seen above. Is there an setting to get the behavior I want anyway?
I need to move hundreds of objects between two layers and currently I'm digging into the SVG and delete all the new filter references, but there ought to be an easier way.

Jelle
Posts: 78
Joined: Sat Nov 06, 2010 11:25 am

Re: move object from transparent layer changes opacity

Postby Jelle » Thu Nov 22, 2012 2:48 am

Zom-B

Are you sure you have 2 layers? Shift+PgDn only changes the Z-order of the objects as far as I know. Seems as if you have 2 objects on the same layer. You cannot set opacity of layers as far as I know, though you could do that in the code by setting the opacity for the whole group. And true,.. once you start messing with opacity, it can be a bit of a hassle to get it straight again if you have set the opacity for every individual object, then grouped it and twiddled a bit more.

And why not just delete the filter from the defs, if it comes to that? That should solve you opacity as well it seems.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: move object from transparent layer changes opacity

Postby brynn » Thu Nov 22, 2012 4:11 am

Well, I've observed the same thing. I didn't reply, because I wasn't sure that it wasn't a bug. I don't think it is a bug, but I can't explain it either. And it could be a bug.

Jelle, yes, you can adjust opacity of a layer (see Layers dialog). And it is true that if you move an object from a semitransparent layer, onto a fully opaque layer, the object still retains the semitransparency from the other layer. Shift + PgDn indeed moves selected objects from an upper layer to the one below it.

The only way I know to avoid the moved object remaining partially transparent, is the make its original layer opaque. Or move all the objects, then Select All and move opacity slider (in F/S dialog) to 100%.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: move object from transparent layer changes opacity

Postby druban » Thu Nov 22, 2012 8:12 am

It's shift-alt-PgDn in all the versions I have, which are not many. What version of Inkscape are you using?
I also can't reproduce the addition of a filter in cases of layers having a blend mode of normal and reduced opacity. In this case although the behaviour is not as expected - especially if you move it back to the original layer (in which case it applies the opacity factor again - but only the first time - doing it again won't apply it again - there is no filter added to the defs or to the object. (A value for opacity will appear in the style.) Are you using a blend mode other than normal?

It's a little bit of a bug of course or depending on your situation, a huge pain, but you just have to remember that
1) a layer is a group.
2) Only groups and objects that have less than 100% global opacity will have an opacity value in their style attribute.
3) It's safer to use the fill-opacity and stroke-opacity via the fill and stroke dialog rather than the global opacity to avoid surprises when moving thing between groups and layers. These will not be affected.
4) I'm not an XML expert. :D
Your mind is what you think it is.

Zom-B
Posts: 15
Joined: Tue May 08, 2012 12:06 am

Re: move object from transparent layer changes opacity

Postby Zom-B » Sat Nov 24, 2012 11:05 am

Yes, I used Screen blending in my design. I use layer opacity as it gives another effect than with object transparency*. I noticed transparency transfer with Normal blending mode too so I assumed the same behavior. If there is no filter in that case then the situations are different but both still transfer opacity in one way or another.

I'm using 0.48, the oldest and newest version I ever had. Shift+Alt+PgDn does nothing at all. Are you sure you're not using plugins? I also have a plugin that adds page support emulation, and adds Ctrl+PgXx keys, so keys can be added.

*
Image

Zom-B
Posts: 15
Joined: Tue May 08, 2012 12:06 am

Re: move object from transparent layer changes opacity

Postby Zom-B » Thu Aug 22, 2013 11:21 pm

I just found another really annoying effect of this bug.

I have a document with 11 layers and an object that I accidentally created on the wrong layer. I move it from layer 2 to layer 7 using repeated Shift+PgUp, and I end up with a transparent object because Layers 3 and 4 just happen to be transparent.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: move object from transparent layer changes opacity

Postby druban » Fri Aug 23, 2013 1:00 pm

Does your version of inkscape have a "move selection to layer..." command in the layer menu?
Your mind is what you think it is.


Return to “Help with using Inkscape”