modified svg export action
Previous Behavior:
Svg export with id was not actually removing ids properly. These are few things I noticed and maybe there are many more which I am missing as I am not that much familiar with actions:
- svg export with multiple id and export-only-id will cause some objects to delete which are needed for next exports.
- svg export with multiple id and without export-only-id just set the canvas and does not remove other ids from svg. It is handled similar to raster export where we just set bounding box.
- svg export for single doc with selected object was not there which confuse/surprise user with multiple documents when they export using multiple id.
New Behavior:
- svg export with multiple id and export-only-id will result in same number of documents as id provided and handle object deletion in doc_copy rather than doc.
- svg export with multiple id and without export-only-id will remove objects unrelated to ids and export a single document with only list ids and their children if any.
Command:
inkscape --export-type="svg" --export-id="MyGroupRect1;MyRect" drawing.svg
inkscape --export-type="svg" --export-id="MyGroupRect1;MyRect;MyGroup" --export-id-only drawing.svg
File: drawing.svg
Result after new Behavior:
PS: I am working on svg export in export dialog. I am trying to integrate actions directly but filenames/overwrites maybe issue. Some suggestions regarding this new implementation will be helpful as same doc modification will be handled in export dialog for selected objects.