On 2/10/10 10:50, Jannetta Steyn wrote:
I am making some animations, probably in a long winded way, but for now that is all I know and I have limited time in which to do it. I have drawn every frame on a different layer, with the first layer being the background. Initially I exported to gif by switching on the first (background) layer and the layer of the frame that I want exported and then doing the export. Then I discovered the inkscape command line and with a script I can now export several layers one after another. However, I have not figured out how to export two layers to one gif so I have had to copy the background to each layer.
For the export I use the following command line instruction in my script:
inkscape --export-png=${1}-${i}.png --export-id=${i} --export-id-only --export-dpi=400 --export-area-page --export-background-opacity=1 ${1}.svg
However, this off course will only export the layer with an object id of ${i}. (I number my layers in starting at 001 and incrementing by 1 so that I can loop in a script).
Is there a way of more than one layer so that I can export layer 000 (the background) and another layer so that I don't have to copy the background onto each layer.
Have you tried putting the background objects on the root layer (always visible, accessible via XML Editor), and export using '--export-id' but omitting '--export-id-only' so that the visible background elements below the selected layer are rendered into the exported bitmap as well?
~suv (admits not having tested it locally)
p.s. Maybe you are also interested in a new extension (work-in-progress): https://code.google.com/p/inkscape-animation-extension/ http://www.inkscapeforum.com/viewtopic.php?f=11&t=6019&p=25434