summaryrefslogtreecommitdiffstats
path: root/share/extensions/layer2png.inx
blob: 1242854fd9fe560ec3be52463a2c1d36aab9409a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
  <name>Export Layer Slices</name>
  <id>org.inkscape.output.export_slices</id>
  <param name="tab" type="notebook">
    <page name="slicer_tab" gui-text="Options">
      <param name="iconmode" type="bool" gui-text="Icon mode">false</param>
      <param name="sizes" type="string" gui-text="Sizes">128, 64, 48, 32, 24, 16</param>
      <param name="layer" type="string" gui-text="Layer with Slices:">slices</param>
      <param name="overwrite" type="bool" gui-text="Overwrite existing exports">true</param>
      <param name="directory" type="path" mode="folder" gui-text="Directory"></param>
      <param name="dpi" type="string" gui-text="DPI">300</param>
    </page>
    <page name="about_tab" gui-text="About">
      <label appearance="header">Layer Slicer</label>
      <label>If you create a layer (default name "slices") with rectangles in it, this extension will export a PNG file for each rectangle into the directory with the name of the {rectangle ID}.png (use Object Properties to set this).</label>
      <label>If the export already exists, it will skip it and color the rectangle GREY. If the "Overwrite existing exports" checkbox is selected, and the file was previously generated, it will color the rectangle RED. For new exports that did not previously exist, the rectangle will be GREEN.</label>
      <label>If you want to create (square) icons at different sizes, select "Icon mode". Icon mode will create a square export for each dimension in "Sizes".</label>

    </page>
  </param>


  <!-- Live preview doesn't make sense so we add this attribute to
       remove it -->
  <effect needs-live-preview="false">
    <object-type>all</object-type>
    <effects-menu>
      <submenu name="Export"/>
    </effects-menu>
  </effect>

  <script>
    <command location="inx" interpreter="python">layer2png.py</command>
  </script>
</inkscape-extension>