Comment 1 for bug 780335

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

> An Inkscape file of mine contains references to filters no longer there.

Did you _remove_ the filter effect in the filter editor dialog while it is still in use for some elements in the document?
Possibly a duplicate of
Bug #275662 “Filter stays in object's css property after Filter Effect dialog removal”
<https://bugs.launchpad.net/inkscape/+bug/275662>

Known "workaround": to avoid such errors, do use 'Filters > Remove filter effects…' on selected objects, or deactivate active filters of selected objects in the filter editor, instead of (or before) completely deleting a filter definition in the editor.

> Meanwhile, is there some way of cleaning up an SVG?

That's beyond the scope of a bug tracker (for support questions, please use #inkscape, the user mailing list, Inkscape's 'Answers' section at Launchpad or the Inkscape Forum).

More information would help to answer the question: what exactly do you want to "clean up"?
- 'File > Vacuum defs…' removes unreferenced resources (definitions) like gradients, pattern, markers, filter effects, masks and clip-paths. Some resources are immediately deleted (auto-collected) when no longer referenced (gradients, patterns, filter effects), others only after applying 'Vacuum defs…' (sometimes it seems necessary to repeat 'Vacuum defs…' a second time: vacuum defs, save, revert, vacuum defs, save - at least in my experience, it looks like references can get kept in memory and only "freed" after reloading the file)).
- Save a copy as "Optimized SVG" can clean up the SVG for and optimize it e.g. for web usage - see the home page of 'Scour' for more details:
<http://www.codedread.com/scour/>
<http://www.codedread.com/scour/ops.php> (automatic operations)
<http://www.codedread.com/scour/#options> (configurable options)