Vacuum defs and patterns

Post questions on how to use or achieve an effect in Inkscape.
Peter Fitzgerald

Vacuum defs and patterns

Postby Peter Fitzgerald » Fri Jun 26, 2009 12:50 pm

As I understand it, the "vacuum defs" function should remove unused patterns. But even though I have no objects using certain patterns, and have vacuumed the defs, the patterns remain as a fill option. Am I doing something wrong? Or is there another way to remove patterns from an SVG? They take up space, and it's a big file, so it would be a real help to me to get rid of them

I'm using .46 on Windows XP.

Thanks in advance!

CarlCravens
Posts: 26
Joined: Wed May 27, 2009 7:32 am

Re: Vacuum defs and patterns

Postby CarlCravens » Sat Jun 27, 2009 1:35 am

It doesn't seem to work that way (at least in 0.46).

For now, the only way I know of to remove unused patterns is to remove them from the XML tree by hand.

Ctrl-Shift-X to open the XML editor...

Find the svg:defs section (should be near the top), and your svg:pattern node where id="patternName". (Click the little right-pointing triangles to expand sections if they're collapsed.)

Select that node line, and click the "Delete XML Node" button, as highlighted below. (Undo works on XML edits here, and edits are immediately reflected in the drawing, so you can always Ctrl-Z if you delete the wrong thing. Always a godo thing to save before you do anything drastic in the XML anyway.)

xml_delete_pattern.png
xml_delete_pattern.png (17.19 KiB) Viewed 1274 times


(I really want a Search feature in the XML editor. Sometimes I end up exiting Inkscape and loading the file into Emacs to make changes.)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 8 guests