~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to release/scripts/uv_seams_from_islands.py

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!BPY
2
2
"""
3
3
Name: 'Seams from Islands'
4
 
Blender: 243
 
4
Blender: 246
5
5
Group: 'UV'
6
6
Tooltip: 'Add seams onto the mesh at the bounds of UV islands'
7
7
"""
8
8
 
9
 
# Add a licence here if you wish to re-distribute, we recommend the GPL
 
9
# ***** BEGIN GPL LICENSE BLOCK *****
 
10
#
 
11
# Script copyright (C) Campbell Barton
 
12
#
 
13
# This program is free software; you can redistribute it and/or
 
14
# modify it under the terms of the GNU General Public License
 
15
# as published by the Free Software Foundation; either version 2
 
16
# of the License, or (at your option) any later version.
 
17
#
 
18
# This program is distributed in the hope that it will be useful,
 
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
# GNU General Public License for more details.
 
22
#
 
23
# You should have received a copy of the GNU General Public License
 
24
# along with this program; if not, write to the Free Software Foundation,
 
25
# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
26
#
 
27
# ***** END GPL LICENCE BLOCK *****
 
28
# --------------------------------------------------------------------------
10
29
 
11
30
from Blender import Scene, Mesh, Window, sys
12
31
import BPyMessages
37
56
        # add seams
38
57
        SEAM = Mesh.EdgeFlags.SEAM
39
58
        for ed in me.edges:
40
 
                if len(set(edge_uvs[ed.key])) > 1:
41
 
                        ed.flag |= SEAM
 
59
                try: # the edge might not be in a face
 
60
                        if len(set(edge_uvs[ed.key])) > 1:
 
61
                                ed.flag |= SEAM
 
62
                except:
 
63
                        pass
42
64
 
43
65
def main():
44
66