Allows to add trivial <animate> tags to a SVG document. Embedded animations work for standalone SVG graphics. Some instructions are understood by the GIF interpolation in ★export_gif <https://inkscape.org/~culturaljuice/%E2%98%85export_gif> (which this was originally intended for). Usually requires selecting one object, invoking the module in Extension➜Animation➜Animate-Yo, and selecting one of the tabs to inject an <animate*> tag. The [move] option additionally requires a selected path (second argument) for transitioning the main object on. You can use Inkscapes´ XML editor (Ctrl+Shift+X) to expand the options (keyFrames also have partial support in export_gif now).
Generates a GIF slideshow from image layers ☰ (Shift+Ctrl+L). The menu option Extensions➔>Export➔GIF-slideshow… iterates over layers to generate animation slides. They get merged from bottom to top. Depending on shape overlap or layer transparency, there's different usage modes: 🞂 With a solid background in each layer, there's no accumulation to take care of. 🞂 Alternatively elect layers` can be labeled as [background] to stick, or [fixed] as permanent foreground, or [merge] for down-grouping. 🞂 If the -layers option is composite/coalesce/merge then all lower layers remain visible until the current frame. 🞂 Any [animate] layers get interpolated as is, layer transparency preserved. Requires ImageMagick installed; fit for standard Linux setups. But might work with convert.exe on Windows. And alternatively there's the builtin Pillow conversion method. The options mostly map to IM flags. 🞂 Without the PNG conversion step, SVG interpretation is up to Imagick, and will not render fancy font/path effects. Just for plain old SVGs. 🞂 The [PNG→Pillow] option works without ImageMagick, but often generates rougher GIFs, yet might produce smaller result files. 🞂 In [JavaScript] mode, no output file will be generated. It just adds a script for animating slides into the current document (web views). 🞂 A [fixed] layer label describes a permanent foreground (until overdrawn), but never constitues a frame. Whereas [background] layers only become active and permanent when its frame is reached. Additionally [merge] labels will enjoin partial layers to the preceding full slide. But also [exclude] to omit layers entirely. 🞂 There's also a rudimentary [animate=5] option to craft subframes from embedded <animate*> instructions. 🞂 Each layer label may also specify ImageMagick flags [--delay=2.5]. 🞂 The "default background color" is useful for otherwise transparent layers. Half-transparancy can be useful to gradually fade out lower frames (only seems to work in SVG/ImageMagick -displace mode). 🞂 Extra arguments are just a list of sample options, might not be particularly useful by themselves. Use the second input or [--flag=X] labels for more refined combinations. 🞂 Can't run two instances in parallel, due to fixed /tmp/inkscape… dir 🞂 It's also available as File > Save As... option (fewer options). 🞂 Tested on Inkscape 1.2 (2022-05-xx) and 1.3-dev (2022-09-xx) Might require some experimentation, and heavily utilizing the preview option. Potential error popups become informative at the very end. Code is derived from Xavi's "Export Layers Redux For Inkscape 1.1+". <https://inkscape.org/~VagabondArcade/%E2%98%85export-layers-redux-for-inkscape-11> ZIP contains the `pmd2inks` command-line tool to ease extending the options dialog (using the <https://pypi.org/project/pluginconf/> format). While the DEB package bundles the new animate_yo extension. v1.0 · more animation support, redesigned dialog v0.9 · add [merge] grouping, preliminary animation support v0.8 · support per frame [--options=xyz] and [exclude] v0.7 · introduce combined modes · JavaScript embed option v0.6 · support file→save-as invocation v0.5 · revamped layer combination handling v0.4 · support SVG export by removing nodes v0.3 · introduced more imagemagick options v0.2 · migrated to plugin meta data · more robust file handling v0.1 · prototype
Very crude converison of SVG into mindustry logic commands. · SVG should be sized 80x80 or 176x176 px. · Only supports a few shapes: ■ rectangles | simple lines ◢ triangles (as closed path) ▰ irregular rectangles (yields two triangle draw instructions) ● circles Ideally you set up document size and rulers to be pixel-based. Because of the rasterization, the output might look jiggly if blocks/lines don't match up coordinates. (Actually using floats now, but consistency helps.) Overdrawings will usually by ignoed by MLOG. To optimize command size, best to also coalesce same-color shapes via layers. Works as CLI tool (single input.svg argument) or in Inkscapes´ File 🞂 Save Copy... export mode (select "Mindustry Logic (*.mlog)" as filetype or edit output filename accordingly). Both also populate the selection clipboard by default. Since rasterization (pixel-scan) requires too many commands, this tool is about minimizing MLOG overhead. Hence the more tedious block-based image requirement.