adjustments in boundingbox and group to layer extension
This commit is contained in:
parent
4296faf68b
commit
700753865c
@ -39,7 +39,6 @@ class DrawBBoxes(inkex.EffectExtension):
|
|||||||
for id, item in self.svg.selected.items():
|
for id, item in self.svg.selected.items():
|
||||||
self.drawBBox(item.bounding_box())
|
self.drawBBox(item.bounding_box())
|
||||||
else:
|
else:
|
||||||
inkex.utils.debug("")
|
|
||||||
#self.drawBBox(self.svg.get_selected_bbox()) #works for InkScape (1:1.0+devel+202008292235+eff2292935) @ Linux and for Windows (but with deprecation)
|
#self.drawBBox(self.svg.get_selected_bbox()) #works for InkScape (1:1.0+devel+202008292235+eff2292935) @ Linux and for Windows (but with deprecation)
|
||||||
self.drawBBox(self.svg.selection.bounding_box()) #works for InkScape 1.1dev (9b1fc87, 2020-08-27)) @ Windows
|
self.drawBBox(self.svg.selection.bounding_box()) #works for InkScape 1.1dev (9b1fc87, 2020-08-27)) @ Windows
|
||||||
|
|
||||||
|
@ -32,8 +32,12 @@ class GroupToLayerEffect(inkex.EffectExtension):
|
|||||||
def effect(self):
|
def effect(self):
|
||||||
depth = self.options.depth
|
depth = self.options.depth
|
||||||
self.tag_g = inkex.addNS('g', 'svg')
|
self.tag_g = inkex.addNS('g', 'svg')
|
||||||
for node in self.svg.selected.values():
|
if len(self.svg.selected) > 0:
|
||||||
self.convert_group(node, depth)
|
for node in self.svg.selected.values():
|
||||||
|
self.convert_group(node, depth)
|
||||||
|
else:
|
||||||
|
inkex.errormsg('Please select some objects first.')
|
||||||
|
return
|
||||||
|
|
||||||
def convert_group(self, node, depth):
|
def convert_group(self, node, depth):
|
||||||
if depth <= 0:
|
if depth <= 0:
|
||||||
|
Reference in New Issue
Block a user