add inkscape:perspective

This commit is contained in:
Mario Voigt 2024-01-17 22:30:08 +01:00
parent 4edeb93fb4
commit 99e42b77b9
2 changed files with 13 additions and 6 deletions

View File

@ -49,8 +49,8 @@
<param name="guide" type="bool" gui-text="guide">true</param>
<param name="mask" type="bool" gui-text="mask">true</param>
<param name="marker" type="bool" gui-text="marker">true</param>
<param name="metadata" type="bool" gui-text="metadata">true</param>
<param name="page" type="bool" gui-text="inkscape:page">true</param>
<param name="perspective" type="bool" gui-text="inkscape:perspective">true</param>
</vbox>
<spacer/>
<vbox>
@ -62,11 +62,16 @@
<param name="use" type="bool" gui-text="use">true</param>
<param name="rdfRDF" type="bool" gui-text="rdf:RDF">true</param>
<param name="ccWork" type="bool" gui-text="cc:Work">true</param>
<param name="comments" type="bool" gui-text="comments">true</param>
<param name="tails" type="bool" gui-text="tails" gui-description="e.g. new lines, white spaces after an XML tag">true</param>
<param name="metadata" type="bool" gui-text="metadata">true</param>
</vbox>
</hbox>
</vbox>
<separator/>
<vbox>
<label appearance="header">Other XML structure</label>
<param name="comments" type="bool" gui-text="comments">true</param>
<param name="tails" type="bool" gui-text="tails" gui-description="e.g. new lines, white spaces after an XML tag">true</param>
</vbox>
</hbox>
<separator/>
<param name="operationmode" type="optiongroup" appearance="combo" gui-text="Operation mode">
@ -88,7 +93,7 @@
<label appearance="header">Ungrouper And Element Migrator/Filter</label>
<label>Running this extension works for current selection or if nothing is selected for whole document. It allows to flatten elements into one group and to drop elements while processing.</label>
<label>Unchecked elements will be dropped, if you selected a filter mode. Groups with transformations might puzzle anywhere. Please run "apply transformations" extension before to avoid this.</label>
<label>2020 - 2023 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
<label>2020 - 2024 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
<spacer/>
<label appearance="header">Online Documentation</label>
<label appearance="url">https://y.stadtfabrikanten.org/migrategroups</label>

View File

@ -1,14 +1,14 @@
#!/usr/bin/env python3
"""
Extension for InkScape 1.0
Extension for InkScape 1.3.2
This extension parses the selection and will put all elements into one single group. If you have a cluster with lots of groups and elements you will clean up this way (one top level group, all elements below it). If you select a single element or a set of elements you just wrap it like using CTRL + G (like making a usual group). You can also use this extension to filter out unwanted SVG elements at all.
Author: Mario Voigt / FabLab Chemnitz
Mail: mario.voigt@stadtfabrikanten.org
Date: 13.08.2020
Last Patch: 13.09.2020
Last Patch: 17.01.2024
License: GNU GPL v3
"""
@ -74,6 +74,7 @@ class UngrouperAndElementMigratorFilter(inkex.EffectExtension):
pars.add_argument("--rdfRDF", type=inkex.Boolean, default=True)
pars.add_argument("--ccWork", type=inkex.Boolean, default=True)
pars.add_argument("--comments", type=inkex.Boolean, default=True)
pars.add_argument("--perspective", type=inkex.Boolean, default=True)
pars.add_argument("--page", type=inkex.Boolean, default=True)
pars.add_argument("--tails", type=inkex.Boolean, default=True)
@ -136,6 +137,7 @@ class UngrouperAndElementMigratorFilter(inkex.EffectExtension):
namespace.append("{http://www.w3.org/2000/svg}marker") if so.marker else ""
namespace.append("{http://www.w3.org/2000/svg}pattern") if so.pattern else ""
namespace.append("{http://www.inkscape.org/namespaces/inkscape}page") if so.page else ""
namespace.append("{http://www.inkscape.org/namespaces/inkscape}perspective") if so.perspective else ""
namespace.append("{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}guide") if so.guide else ""
namespace.append("{http://www.w3.org/1999/02/22-rdf-syntax-ns#}RDF") if so.rdfRDF else ""
namespace.append("{http://creativecommons.org/ns#}Work") if so.ccWork else ""