Parametrized selection of objects

Registered by Diego Sevilla Ruiz

This blueprint has been superseded. See the newer blueprint "Universal find/replace dialog" for updated plans.

I sometimes want (for example) to select all text objects of a drawing, but not *all* the objects of the drawing. It would be nice to have an additional "Select All..." menu item that allows to specify what kind of objects you want to select.

Alternatively, a menu entry could be added for the opposite: "Deselect All...", that does the same in reverse: deselect objects by type.

A more detailed dialog could be created, for example, being able to select/deselect by type and other properties (stroke color, background color, etc.) and/or adding several lines joined by "and/or", for instance, "select all text objects AND all 3D boxes".

I know that this one starts the off topic, but this could be even the start of a tiny scripting language that would allow for instance specify things like:

"select all text objects and rotate 90" (would rotate all text objects 90 deg.)
"select all text objects and scale 20%"
"select all text objects and setfont 'DejaVu Sans-20'"

etc.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Superseded
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
jazzynico

Related branches

Sprints

Whiteboard

2008-09-22 nilsb: plus one for this draft.

When making scientific illustrations, one of the most common conplaints by journal editors is "the lines are too thin". With a "select by line width" feature this would take two seconds to correct. I used the corresponding feature in Adobe Illustrator a lot.

Since the "select by ..." idea is essentially a search-and-replace operation in the svg source, it may make sense to implement it that way: as some enhanced search-and-replace dialog inside the existing SVG editor.

Also, imagine the creative potential: "Hmm, I find all the 300 gray polylines in my drawing should look a bit fuzzier, and all the 5000 lines between dark red and light red should now become blue."

2008-09-22 Alexandre Prokoudine. This draft somehow duplicates an already existing draft for find/replace dialog done by me ;-) Here it is: https://blueprints.launchpad.net/inkscape/+spec/find-replace-dialog

2008-09-22 Diego Sevilla: Hi, Alexandre: Yes, your proposal is similar to this one, and I think that both could currently merge. What you propose is strictly find and replace. What I proposed is just a way of selecting, not determining what to do next with the selection. In your proposal, actions to be applied to selected objects depend on the objects being selected, avoiding, for example, selecting objects of different types. What if I want to perform a "delete" on all the selected objects?

What I see on a merge is an option to "just select" things given search patterns, or "select and do" actions. Just selecting is powerful enough, as the user can then apply any transformation he or she wants (changing color, like thickness, etc.), not just the limited list of transformations you chose for each type of object being changed.

More on the merging, the selection could be done either by a specialized search and replace window (with a checkbox to indicate just make a selection, not apply any transformation) or by a small language as I mentioned in my proposal:

"select all font objects change size by +10pt"

etc, the "change" word being optional, only specified if you want to change the selected objects (the equivalent of your "replace" approach).

2008-09-23 nilsb: I agree that searching and selecting may be powerful enough; i can't think of an example where a 'replace' can do more than what you could do easily 'by hand' after selecting. Wait: what about randomization?

Another thought: it is important to be able to restrict the search scope, to a specific layer or group etc.
If the feature were implemented as boolean searching in the XML editor, this is facilitated by the tree structure that it already has: one could select several nodes (by hand or by a previous serach) and let the search run only over everything below these nodes...

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.