Batch Export overwrites files without warning
Summary:
Batch Export PNG re-writes PNGs exported from other files.
I need several PNG images with transparent borders around them. For this, I made a template file with rectangles. After drawing my images, I select those rectangles, hide the template layer, and do batch export.
Today I've installed Inkscape ver. 1.01 and after exporting my PNGs, I discovered that out of 6 objects, 3 new PNGs were created (in the same folder where my SVG was) and 3 of my old PNGs (exported from a different file, from the earlier version of Inkscape, and located in a different folder) were replaced without even a warning.
My guess starts
I guess the following happens: when an object is created, Inkscape assigns a name to it (rectXXX, imageYYY, or whatever). During Batch Export, Inkscape uses that name to generate PNGs. Also, if you previously exported a single PNG for some object, Inkscape remembers that PNG's filename and will use it in Batch Export. The problem arises when we copy images from file to file or create a new file using Save As. When an object is copied, its name stays the same, and Batch Export PNGs' default names will be the same, so Batch Export will re-write existing files. If the copied object has a PNG file name associated with it, Inkscape will use it.
My guess ends
So, what I did exactly:
- Create a template with a rectangles layer
- Create a file using that template
- Export PNGs for several objects one by one
- Create a new SVG using Save As
- Delete some layers, add some layers and draw some images
- Batch Export images -> got a mess.
Steps to reproduce:
As you asked, the minimal version.
- open Inkscape
- draw several objects (batch_export_bug_1.svg)
- use Batch Export
- create a new file
- copy objects from the old file to the new one (batch_export_bug_2.svg)
- use Batch Export
What happened?
PNG files from the first Batch Export are re-written.
What should have happened?
- Batch Export should NOT re-write PNGs exported from other files!
- Batch Export should at least give a warning when replacing files, with the option to cancel the export.
- To be useful, Batch Export should either attach SVG file names (original-svg-rectXXX.png) or create a new folder (original-svg\rectXXX.png)
Sample attachments:
Version Info:
- Inkscape Version: 1.0.1 (3bc2e813f5, 2020-09-07)
- Operating System: Windows 8.1
- Operating System version: 64