[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26000] trunk/blender/release/scripts/op/ uv.py: uv layout svg files were not importing into inkscape or firefox ( gimp worked)

Campbell Barton ideasman42 at gmail.com
Thu Jan 14 15:33:05 CET 2010


Revision: 26000
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26000
Author:   campbellbarton
Date:     2010-01-14 15:33:05 +0100 (Thu, 14 Jan 2010)

Log Message:
-----------
uv layout svg files were not importing into inkscape or firefox (gimp worked)

Modified Paths:
--------------
    trunk/blender/release/scripts/op/uv.py

Modified: trunk/blender/release/scripts/op/uv.py
===================================================================
--- trunk/blender/release/scripts/op/uv.py	2010-01-14 14:26:39 UTC (rev 25999)
+++ trunk/blender/release/scripts/op/uv.py	2010-01-14 14:33:05 UTC (rev 26000)
@@ -111,7 +111,7 @@
             
             for j, uv in enumerate(uvs):
                 x, y = uv.x, 1.0 - uv.y
-                fw('%f.3f,%f.3f ' % (x * image_width, y * image_height))
+                fw('%.3f,%.3f ' % (x * image_width, y * image_height))
             fw('" />\n')
         fw('\n')
         fw('</svg>\n')
@@ -130,7 +130,7 @@
 bpy.types.register(ExportUVLayout)
 
 def menu_func(self, context):
-    default_path = bpy.data.filename.replace(".blend", "_%s.svg" % bpy.utils.clean_name(getattr(context.object, "name", "none")))
+    default_path = bpy.data.filename.replace(".blend", ".svg")
     self.layout.operator(ExportUVLayout.bl_idname).path = default_path
 
 bpy.types.IMAGE_MT_uvs.append(menu_func)





More information about the Bf-blender-cvs mailing list