diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-02-01 14:38:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-02-01 14:38:38 +0300 |
commit | 80315d0c9bc6683e06b544e04889ecdff9892426 (patch) | |
tree | 69dc88e504ba9bed041bcad315c31fbcd406db8c /release/scripts/uvcalc_quad_clickproj.py | |
parent | 7e9f86bbf00523bde09f92dc7e86dcb2c3a7cf2a (diff) |
faces in face select mode can be selected and hidden, check that faces are not hidden as well as being selected.
Diffstat (limited to 'release/scripts/uvcalc_quad_clickproj.py')
-rw-r--r-- | release/scripts/uvcalc_quad_clickproj.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/release/scripts/uvcalc_quad_clickproj.py b/release/scripts/uvcalc_quad_clickproj.py index 2806bc9eae6..734306e2855 100644 --- a/release/scripts/uvcalc_quad_clickproj.py +++ b/release/scripts/uvcalc_quad_clickproj.py @@ -164,14 +164,20 @@ def main(): project_mat = Matrix([0,0,0], [0,0,0], [0,0,0]) - SELECT_FLAG = Blender.Mesh.FaceFlags['SELECT'] - def get_face_coords(f): f_uv = f.uv return [(v.co-face_corner_main, f_uv[i]) for i,v in enumerate(f.v)] - coords = [ (co,uv) for f in me.faces if f.flag & SELECT_FLAG for co, uv in get_face_coords(f)] - del SELECT_FLAG + + + SELECT_FLAG = Blender.Mesh.FaceFlags.SELECT + HIDE_FLAG = Blender.Mesh.FaceFlags.HIDE + def use_face(f_flag): + if f_flag & HIDE_FLAG: return False + elif f_flag & SELECT_FLAG: return True + else: return False + + coords = [ (co,uv) for f in me.faces if use_face(f.flag) for co, uv in get_face_coords(f)] coords_orig = [uv.copy() for co, uv in coords] USE_MODIFIER = using_modifier(ob) |