Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-16 11:33:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-16 11:33:47 +0400
commitd98814b21c773137b01c8c94db875790cbbfb389 (patch)
tree85ea3068c7dc0c151f7c2412dda9a0e35ca03bed /io_mesh_uv_layout
parent40bf5c2430b090cea2b2dc46426dba20cb374794 (diff)
fix [#30971] viewBox attribute in exported svg wrong
Diffstat (limited to 'io_mesh_uv_layout')
-rw-r--r--io_mesh_uv_layout/__init__.py6
-rw-r--r--io_mesh_uv_layout/export_uv_svg.py4
2 files changed, 3 insertions, 7 deletions
diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py
index 178f32a2..6bd3aae6 100644
--- a/io_mesh_uv_layout/__init__.py
+++ b/io_mesh_uv_layout/__init__.py
@@ -158,9 +158,6 @@ class ExportUVLayout(bpy.types.Operator):
end = start + p.loop_total
uvs = tuple((uv.uv[0], uv.uv[1])
for uv in uv_layer[start:end])
- #~ uv = uv_elem.uv
- #~ if False not in uv_elem.select_uv[:len(uv)]:
- #~ yield (i, uv)
# just write what we see.
yield (i, uvs)
@@ -192,7 +189,7 @@ class ExportUVLayout(bpy.types.Operator):
elif mode == 'PNG':
from . import export_uv_png
func = export_uv_png.write
- if mode == 'SVG':
+ elif mode == 'SVG':
from . import export_uv_svg
func = export_uv_svg.write
@@ -202,7 +199,6 @@ class ExportUVLayout(bpy.types.Operator):
mesh = obj.data
func(fw, mesh, self.size[0], self.size[1], self.opacity,
-# self.tessellated,
lambda: self._face_uv_iter(context, mesh, self.tessellated))
if self.modified:
diff --git a/io_mesh_uv_layout/export_uv_svg.py b/io_mesh_uv_layout/export_uv_svg.py
index ff504a0f..764f0d34 100644
--- a/io_mesh_uv_layout/export_uv_svg.py
+++ b/io_mesh_uv_layout/export_uv_svg.py
@@ -29,7 +29,7 @@ def write(fw, mesh, image_width, image_height, opacity, face_iter_func):
fw('<?xml version="1.0" standalone="no"?>\n')
fw('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" \n')
fw(' "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')
- fw('<svg width="%dpx" height="%dpx" viewBox="0px 0px %dpx %dpx"\n' %
+ fw('<svg width="%d" height="%d" viewBox="0 0 %d %d"\n' %
(image_width, image_height, image_width, image_height))
fw(' xmlns="http://www.w3.org/2000/svg" version="1.1">\n')
desc = ("%r, %s, (Blender %s)" %
@@ -54,7 +54,7 @@ def write(fw, mesh, image_width, image_height, opacity, face_iter_func):
except IndexError:
fill = fill_default
- fw('<polygon stroke="black" stroke-width="1px"')
+ fw('<polygon stroke="black" stroke-width="1"')
if opacity > 0.0:
fw(' %s fill-opacity="%.2g"' % (fill, opacity))