ungrouping a clipped group unclips it, clipping path lost

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

ungrouping a clipped group unclips it, clipping path lost

Postby brynn » Sun Jul 25, 2010 8:43 am

Hi Friends,
I've noticed that if I clip a group of objects (or paths), and later need to ungroup for some reason, the whole thing becomes unclipped. There is probably some reason for that, which I haven't learned yet. Normally if I unclip something, the original clipping path reappears; and indeed if I unclip a group, the clipping path reappears as expected.

But if I have a clipped group of objects, later need to ungroup, and the whole thing becomes unclipped, the clipping path does not reappear. I can't find it anywhere. Is there a reason for this? Or is it still there somewhere? Or have I stumbled upon a bug (once again)?

Thanks for your help :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: ungrouping a clipped group unclips it, clipping path lost

Postby ~suv » Sun Jul 25, 2010 7:52 pm

brynn wrote:But if I have a clipped group of objects, later need to ungroup, and the whole thing becomes unclipped, the clipping path does not reappear.

Did you release the clip before ungrouping?

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

Re: ungrouping a clipped group unclips it, clipping path lost

Postby brynn » Sun Jul 25, 2010 9:35 pm

No.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: ungrouping a clipped group unclips it, clipping path lost

Postby ~suv » Sun Jul 25, 2010 10:09 pm

brynn wrote:No.
In my tests the clip-path that was applied to the group reappears as expected if I release the clip of the clipped object (aka the group) first - the same way as is used for normal clips on individual objects.

Ungrouping without releasing the clip does not automatically apply a 'Object > Clip > Release' first - it removes the object that was clipped (i.e. the group) from the drawing - with it the information about the clipping and the link to the clip-path (which remains as orphaned or unused clip-path in the <defs> section of the SVG file).

To me this seems correct behavior - but maybe it could be improved usability-wise (though I have no idea how).

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: ungrouping a clipped group unclips it, clipping path lost

Postby ~suv » Sun Jul 25, 2010 10:33 pm

~suv wrote:(…) but maybe it could be improved usability-wise (though I have no idea how).

The issue I have with changing current behavior is that different users might expect different things (and changing it one way will not satisfy the other expectations):
  • ungrouping a clipped group removes the clip (current behavior)
  • ungrouping a clipped group releases the clip first and then ungroups
  • ungrouping a clipped group ungroups and applies its clip-path to each former child (aka member) of the group (visual result will be the same as before ungrouping)
On the other hand the problem can be avoided by treating the clipped group the same as any other clipped object (as user): if you want to release the clip to have the clip-path restored as normal editable object, use 'Object > Clip > Release' and not 'Object > Ungroup'.

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

Re: ungrouping a clipped group unclips it, clipping path lost

Postby brynn » Sun Jul 25, 2010 10:51 pm

Thanks ~suv.
Obviously this is not a huge problem. I just didn't want to have rogue clipping paths hiding within my image :?
I knew I could edit an object/path after clipping, and needed to edit one object in the group. But I was having trouble selecting it, thus the need to ungroup. Although now that I think about it, I probably don't need to group. It just helps keep things aligned properly. No matter how hard I try, somehow I always end up with one object, path or clipping path shifted slightly, and peeking out behind other layers or whatever.

Anyway, thanks for having a look at it :D

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: ungrouping a clipped group unclips it, clipping path lost

Postby ~suv » Sun Jul 25, 2010 11:16 pm

brynn wrote:(…) and needed to edit one object in the group. But I was having trouble selecting it, thus the need to ungroup.

What I do if selecting a certain object within a group is difficult:
  1. select the clipped group
  2. use the context menu entry to enter the group
  3. use <TAB> (or <Shift>+<TAB> if the element is among the top-rendered elements) to go through the elements within the group until I have the right one selected.
    or - alternatively at this point - open the XML Editor and select the object within the group there

brynn wrote:Although now that I think about it, I probably don't need to group. It just helps keep things aligned properly.

Groups for clips or masks are useful IMHO (to allow editing and adding/pasting objects to or removing objects from the clip without the need to release it) - I also use them often, and with the development shapshots or prerelease version of 0.48 even always ;-): Inkscape 0.48 will have a new preference setting for 'Clippaths and mask' to optionally "put all clipped/masked objects into a group". These 'auto-added' groups will be removed again automatically when releasing such a clip or mask.

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

Re: ungrouping a clipped group unclips it, clipping path lost

Postby brynn » Mon Jul 26, 2010 12:28 pm

What I do if selecting a certain object within a group is difficult:

select the clipped group
use the context menu entry to enter the group
use <TAB> (or <Shift>+<TAB> if the element is among the top-rendered elements) to go through the elements within the group until I have the right one selected.
or - alternatively at this point - open the XML Editor and select the object within the group there

Hey, look at that! I didn't know you could "enter a group". I've seen that "g1234" in the layer list below the canvas, and never knew what it was. I use a touchpad mouse which is prone to static discharges, and sometimes get a double-click by accident. Sometimes when that happens, I can't select anything, and when I see that "g1234", I know I accidentally double-clicked. I just didn't know I was entering a group! So it looks like you can also double-click a group to enter it.

Well anyway, thanks for the info. It's very helpful :D

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

Re: ungrouping a clipped group unclips it, clipping path lost

Postby druban » Mon Jul 26, 2010 3:56 pm

~suv wrote:use the context menu entry to enter the group

Will you look at that! A context menu with 'enter group' ! That command is missing from the edit menu even with a group selected. Is that really part of the UI vision of Inkscape's developers ...? It seems that every command should be accessible from the menu bar.
Anyway I have been using ctrl + enter to enter groups (easy to remember, eh?) :D and ctrl + backspace to exit. I note there is no context menu item to exit groups (that I could find) so I'm just mentioning it here in an unnecessarily long post.
Your mind is what you think it is.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: ungrouping a clipped group unclips it, clipping path lost

Postby ~suv » Mon Jul 26, 2010 4:22 pm

druban wrote:Is that really part of the UI vision of Inkscape's developers ...? It seems that every command should be accessible from the menu bar.

Agreed ;) - there are others: 'Image properties' for the selected (linked or embedded) image for example, and the related 'Edit Externally…' (not sure if the latter is listed in the context menu on Windows though).

Related to the context menu: a rarely known (but imho very useful) shortcut to open the context menu without mouse click (e.g. after selecting a lower object with 'Alt-Click'): <Shift>+<F10>


Return to “Help with using Inkscape”