fix [#27199] Copy Mirrored UV Coords missing the reverse option
This commit is contained in:
parent
1a7a623c56
commit
2cdb79239b
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
from bpy.props import EnumProperty
|
||||||
|
|
||||||
|
|
||||||
class MeshSelectInteriorFaces(bpy.types.Operator):
|
class MeshSelectInteriorFaces(bpy.types.Operator):
|
||||||
'''Select faces where all edges have more then 2 face users.'''
|
'''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):
|
class MeshMirrorUV(bpy.types.Operator):
|
||||||
'''Copy mirror UV coordinates on the X axis based on a mirrored mesh'''
|
'''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_label = "Copy Mirrored UV coords"
|
||||||
bl_options = {'REGISTER', 'UNDO'}
|
bl_options = {'REGISTER', 'UNDO'}
|
||||||
|
|
||||||
|
direction = EnumProperty(items=(
|
||||||
|
('POSITIVE', "Positive", ""),
|
||||||
|
('NEGATIVE', "Negative", "")),
|
||||||
|
name="Axis Direction",
|
||||||
|
description="")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
ob = context.active_object
|
ob = context.active_object
|
||||||
return (ob and ob.type == 'MESH')
|
return (ob and ob.type == 'MESH')
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
DIR = 1 # TODO, make an option
|
DIR = (self.direction == 'NEGATIVE')
|
||||||
|
|
||||||
from mathutils import Vector
|
from mathutils import Vector
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ class IMAGE_MT_uvs(bpy.types.Menu):
|
|||||||
layout.operator("uv.average_islands_scale")
|
layout.operator("uv.average_islands_scale")
|
||||||
layout.operator("uv.minimize_stretch")
|
layout.operator("uv.minimize_stretch")
|
||||||
layout.operator("uv.stitch")
|
layout.operator("uv.stitch")
|
||||||
layout.operator("mesh.faces_miror_uv")
|
layout.operator("mesh.faces_mirror_uv")
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user