Clip/Set/Release copies all objects

Bug #1476028 reported by crowcoder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

I'm doing clip -> Set, then clip-> Release on a few simple rectangles and a block of text. Each time I do my object count increases dramatically. After 9 clip/set/releases, I have 2050 selected objects and I started with about 6.
v0.91
Win 8.1

Tags: clipping
Revision history for this message
crowcoder (bob-w) wrote :
Revision history for this message
Hachmann (marenhachmann) wrote :

For me, it only multiplies the clipping path - which I expected, as the items were not grouped (in your picture: text is a group, the rectangle is separate), and consequently the clipping needed to be applied to every single object individually.
Selected objects are not grouped automatically for clipping.
When you select a single clipped object, you will only get a single clipping path when you release it.

To get what you want, group the objects first and apply your clip path to the group.

Also see manual:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Clip.html

"New in v0.48: By default, Inkscape will clip or mask each object separately if several objects are selected. In the Clippaths and masks section of the Inkscape Preferences dialog you can change this to have Inkscape first group the objects before applying a single clip or mask. "

su_v (suv-lp)
tags: added: clipping
Revision history for this message
su_v (suv-lp) wrote :

Proposing to close this report as 'Invalid':
1) The reported behavior is to be expected based on the current implementation, and on the default preferences for clippaths and masks:
- Applying 'Object > Clip > Set' to a selection of multiple objects tells Inkscape to set a clip for each selected object using the geometry of the top-most element for the clip (for each clip to be set, a <clipPath> definition is created in the defs section, containing a copy of the top-most element of the selection for the geometry of the clipped region; and a 'clip-path' attribute is added to the clipped object, referencing its clipPath definition in the defs section).
- Applying 'Object > Clip > Release' to a selection of multiple clipped objects will apply the 'Release' command to each object individually, and the released clip-path will be retained as regular visible element for each of the formerly clipped object.
There is no command or session history associated with individual clip-paths or clipPath definitions in Inkscape (or SVG 1.1), or other data based on which Inkscape could second-guess whether or not the user wants to retain the released clip-path or not (e.g. in the reported case of repeatedly setting and releasing a clip for a selection of individual objects).
2) This is foremost a question about usage, not a bug: as mentioned by Maren, Inkscape does fully support alternative workflows to clip a large number of objects with a single clip by putting the objects into a group first (and to optionally handle such helper groups transparently if the preferences for clippaths and masks are set accordingly).
Note that using groups for such a task also brings the benefit of being able to easily add/remove objects from the clip, and to edit any of the objects within the clip without having to release the clip at all - please see the related section in the manual about working with groups (entering groups, selecting individual objects within a group, etc.):
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Groups.html
3) There is no proposal in the report for an alternative clip command either, nor details how this could be implemented without breaking other workflows/use cases (e.g. optionally clip with a clone of a copy of the top-most object created in the defs section, and never retain a released clip-path if the clip uses a clone in the clipPath definition. Note that such a changed behavior on releasing a clip could break workflows for users who use clones for clipping (or masking) for other reasons than to be able to set and release clips on a selection repeatedly without re-adjusting the selection of objects or controlling whether the current selection still reflects the user's intent. It would also disable editing an applied clip-path or mask with the node tool since clones have no handles which could be adjusted with the node tool).

Revision history for this message
su_v (suv-lp) wrote :

Here's an old discussion on the devel mailing list from 2006 about the initial interface implementation for clippaths and masks - among the discussed topics are also auto-grouping and shared versus separate clipPath / mask definitions:
http://inkscape.13.x6.nabble.com/Clip-path-and-mask-UI-patch-need-guidance-td2796832.html

Currently, Inkscape has no interface options supporting shared clipPath (or Mask) definitions, whereas live-editing of clippaths and masks without releasing first, and optional auto-grouping as been implemented since.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.