Fix #3084. Issue where drawings with no elements couldn't be generated.

This commit is contained in:
Dion Moult
2023-05-06 11:02:41 +10:00
parent 769dd6c09a
commit 89310d19cb
@@ -486,6 +486,14 @@ class CreateDrawing(bpy.types.Operator):
results = self.svg_buffer.get_value()
root = etree.fromstring(results)
group = root.find("{http://www.w3.org/2000/svg}g")
if not group:
with open(svg_path, "wb") as svg:
svg.write(etree.tostring(root))
return svg_path
self.move_projection_to_bottom(root)
self.merge_linework_and_add_metadata(root)