How to select all objects with undefined fill color ?

Post questions on how to use or achieve an effect in Inkscape.
amjahed
Posts: 5
Joined: Sat Apr 02, 2011 4:02 am

How to select all objects with undefined fill color ?

Postby amjahed » Sat Apr 02, 2011 4:12 am

Salam for all,
I want to dlete all texts in this file : http://commons.wikimedia.org/wiki/File: ... ian%29.svg
Find/text return nothing, texte were converted to paths (with undefined fill color).
I like to try to select all objects with undefined fill color. How to do it ?
Thanks for the help.

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

Re: How to select all objects with undefined fill color ?

Postby ~suv » Sat Apr 02, 2011 4:57 pm

amjahed wrote:I like to try to select all objects with undefined fill color. How to do it ?

As you noticed, you can't search for an absent attribute in Inkscape.

A workaround to separate objects with a fill attribute from those without:
  1. create two new layers ("Filled", "Unfilled")
  2. select one of the objects on the map to return focus and drawing level to 'root'
  3. with 'Edit > Find…' select all objects which have an attribute 'fill' (Important: don't use all types, deselect 'groups' from the list of types)
  4. move the resulting selection of paths and objects into the new layer "Filled" (note: this operation might take a while)
  5. hide the layer "Filled"
  6. select one of the remaining labels to return focus and drawing level to 'root'
  7. with 'Edit > Find…' select all objects except groups (no further search criteria)
  8. move the selection (unfilled paths and polygons) to the other new layer ("Unfilled")
Now you have a layer with filled objects and one with unfilled objects.

Note I: this workflow basically needs to ungroup all existing groups (of text converted to path), you might want to further split the content into additional layers if you plan more complex work based on the current map (use the different fill colors to select a subset of the filled paths with 'Edit > Find…').

Note II: this workflow leaves behind a lot of empty groups in the 'root' level: to remove them all in one go, you need to again make 'root' the current drawing level (either use the focus bug from the layer dialog as workaround, or select one of the empty groups in 'Edit > XML Editor…'), then - back in the main window - use 'Ctrl+a' & delete (check the message in the status line that the selection only contained groups).
Attachments
amjahed-Map_of_Brazil_separated.svgz
(180.6 KiB) Downloaded 145 times

amjahed
Posts: 5
Joined: Sat Apr 02, 2011 4:02 am

Re: How to select all objects with undefined fill color ?

Postby amjahed » Sun Apr 03, 2011 10:18 am

Thanks :)

After following those steps, remaining texts groupes have two fill color, so it was so easy to select and remove them.
My map is now without labels !
Attachments
originale-and-modified-map.png
originale-and-modified-map.png (119.42 KiB) Viewed 1077 times


Return to “Help with using Inkscape”