fix [#27199] Copy Mirrored UV Coords missing the reverse option

This commit is contained in:
2011-04-29 05:32:27 +00:00
parent 1a7a623c56
commit 2cdb79239b
2 changed files with 11 additions and 3 deletions

View File

@@ -20,6 +20,8 @@
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 MeshSelectInteriorFaces(bpy.types.Operator):
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