[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38015] trunk/blender/release/scripts/ startup/bl_operators/mesh.py: uv mirror poll function wasnt checking UV' s were available on the mesh.
Campbell Barton
ideasman42 at gmail.com
Fri Jul 1 15:25:01 CEST 2011
Revision: 38015
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38015
Author: campbellbarton
Date: 2011-07-01 13:25:00 +0000 (Fri, 01 Jul 2011)
Log Message:
-----------
uv mirror poll function wasnt checking UV's were available on the mesh.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_operators/mesh.py
Modified: trunk/blender/release/scripts/startup/bl_operators/mesh.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/mesh.py 2011-07-01 13:10:49 UTC (rev 38014)
+++ trunk/blender/release/scripts/startup/bl_operators/mesh.py 2011-07-01 13:25:00 UTC (rev 38015)
@@ -81,8 +81,8 @@
@classmethod
def poll(cls, context):
- ob = context.active_object
- return (ob and ob.type == 'MESH')
+ obj = context.active_object
+ return (obj and obj.type == 'MESH' and obj.data.uv_textures.active)
def execute(self, context):
DIR = (self.direction == 'NEGATIVE')
@@ -120,12 +120,7 @@
if j is not None:
vmap[i] = j
- active_uv_layer = None
- for lay in mesh.uv_textures:
- if lay.active:
- active_uv_layer = lay.data
- break
-
+ active_uv_layer = mesh.uv_textures.active.data
fuvs = [(uv.uv1, uv.uv2, uv.uv3, uv.uv4) for uv in active_uv_layer]
fuvs_cpy = [(uv[0].copy(), uv[1].copy(), uv[2].copy(), uv[3].copy()) for uv in fuvs]
More information about the Bf-blender-cvs
mailing list