diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-05-27 17:32:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-05-27 17:32:10 +0400 |
commit | 0eb8ea7429ad09fd463211550b3ab089de2630fb (patch) | |
tree | 89cd7b0c8ed349eed6ca2a32691f0420fefc9ae7 /release | |
parent | c25b845abe39f82a35e1cdd83fa2f4533768769f (diff) |
bugfix, edges with no faces raised an error.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/uv_seams_from_islands.py | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/release/scripts/uv_seams_from_islands.py b/release/scripts/uv_seams_from_islands.py index 241f38fc4aa..7f156efde7d 100644 --- a/release/scripts/uv_seams_from_islands.py +++ b/release/scripts/uv_seams_from_islands.py @@ -1,12 +1,31 @@ #!BPY """ Name: 'Seams from Islands' -Blender: 243 +Blender: 246 Group: 'UV' Tooltip: 'Add seams onto the mesh at the bounds of UV islands' """ -# Add a licence here if you wish to re-distribute, we recommend the GPL +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# Script copyright (C) Campbell Barton +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ***** END GPL LICENCE BLOCK ***** +# -------------------------------------------------------------------------- from Blender import Scene, Mesh, Window, sys import BPyMessages @@ -37,8 +56,11 @@ def seams_from_islands(me): # add seams SEAM = Mesh.EdgeFlags.SEAM for ed in me.edges: - if len(set(edge_uvs[ed.key])) > 1: - ed.flag |= SEAM + try: # the edge might not be in a face + if len(set(edge_uvs[ed.key])) > 1: + ed.flag |= SEAM + except: + pass def main(): |