Added svg:symbol, fixed some obsoletion

This commit is contained in:
Mario Voigt 2020-09-07 17:36:19 +02:00
parent d1fe45451f
commit 3247d5f272
2 changed files with 5 additions and 2 deletions

View File

@ -46,6 +46,7 @@
<param name="image" type="bool" gui-text="image">true</param>
<param name="metadata" type="bool" gui-text="metadata">true</param>
<param name="script" type="bool" gui-text="script">true</param>
<param name="symbol" type="bool" gui-text="symbol">true</param>
<param name="use" type="bool" gui-text="use">true</param>
</vbox>
</hbox>

View File

@ -51,6 +51,7 @@ class MigrateGroups(inkex.Effect):
self.arg_parser.add_argument("--meshPatch", type=inkex.Boolean, default=True)
self.arg_parser.add_argument("--metadata", type=inkex.Boolean, default=True)
self.arg_parser.add_argument("--script", type=inkex.Boolean, default=True)
self.arg_parser.add_argument("--symbol", type=inkex.Boolean, default=True)
self.arg_parser.add_argument("--stop", type=inkex.Boolean, default=True)
self.arg_parser.add_argument("--use", type=inkex.Boolean, default=True)
self.arg_parser.add_argument("--flowRoot", type=inkex.Boolean, default=True)
@ -79,6 +80,7 @@ class MigrateGroups(inkex.Effect):
namespace.append("{http://www.w3.org/2000/svg}meshRow") if self.options.meshRow else ""
namespace.append("{http://www.w3.org/2000/svg}meshPatch") if self.options.meshPatch else ""
namespace.append("{http://www.w3.org/2000/svg}script") if self.options.script else ""
namespace.append("{http://www.w3.org/2000/svg}symbol") if self.options.symbol else ""
namespace.append("{http://www.w3.org/2000/svg}metadata") if self.options.metadata else ""
namespace.append("{http://www.w3.org/2000/svg}stop") if self.options.stop else ""
namespace.append("{http://www.w3.org/2000/svg}use") if self.options.use else ""
@ -188,8 +190,8 @@ class MigrateGroups(inkex.Effect):
# finally removed dangling empty groups using external extension (if installed)
if self.options.cleanup == True:
try:
import fablabchemnitz_cleangroups
fablabchemnitz_cleangroups.CleanGroups.effect(self)
import cleangroups
cleangroups.CleanGroups.effect(self)
except:
inkex.utils.debug("Calling 'Remove Empty Groups' extension failed. Maybe the extension is not installed. You can download it from official InkScape Gallery.")