[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36379] trunk/blender/release/scripts/ startup: fix [#27199] Copy Mirrored UV Coords missing the reverse option

Campbell Barton ideasman42 at gmail.com
Fri Apr 29 07:32:28 CEST 2011


Revision: 36379
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36379
Author:   campbellbarton
Date:     2011-04-29 05:32:27 +0000 (Fri, 29 Apr 2011)
Log Message:
-----------
fix [#27199] Copy Mirrored UV Coords missing the reverse option

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/mesh.py
    trunk/blender/release/scripts/startup/bl_ui/space_image.py

Modified: trunk/blender/release/scripts/startup/bl_operators/mesh.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/mesh.py	2011-04-29 05:01:50 UTC (rev 36378)
+++ trunk/blender/release/scripts/startup/bl_operators/mesh.py	2011-04-29 05:32:27 UTC (rev 36379)
@@ -20,7 +20,9 @@
 
 import bpy
 
+from bpy.props import EnumProperty
 
+
 class MeshSelectInteriorFaces(bpy.types.Operator):
     '''Select faces where all edges have more then 2 face users.'''
 
@@ -66,17 +68,23 @@
 
 class MeshMirrorUV(bpy.types.Operator):
     '''Copy mirror UV coordinates on the X axis based on a mirrored mesh'''
-    bl_idname = "mesh.faces_miror_uv"
+    bl_idname = "mesh.faces_mirror_uv"
     bl_label = "Copy Mirrored UV coords"
     bl_options = {'REGISTER', 'UNDO'}
 
+    direction = EnumProperty(items=(
+                        ('POSITIVE', "Positive", ""),
+                        ('NEGATIVE', "Negative", "")),
+                name="Axis Direction",
+                description="")
+
     @classmethod
     def poll(cls, context):
         ob = context.active_object
         return (ob and ob.type == 'MESH')
 
     def execute(self, context):
-        DIR = 1  # TODO, make an option
+        DIR = (self.direction == 'NEGATIVE')
 
         from mathutils import Vector
 

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py	2011-04-29 05:01:50 UTC (rev 36378)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py	2011-04-29 05:32:27 UTC (rev 36379)
@@ -263,7 +263,7 @@
         layout.operator("uv.average_islands_scale")
         layout.operator("uv.minimize_stretch")
         layout.operator("uv.stitch")
-        layout.operator("mesh.faces_miror_uv")
+        layout.operator("mesh.faces_mirror_uv")
 
         layout.separator()
 




More information about the Bf-blender-cvs mailing list