~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to release/scripts/slp_import.py

Tags: upstream-2.40
ImportĀ upstreamĀ versionĀ 2.40

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
tolerance.
30
30
"""
31
31
 
32
 
# $Id: slp_import.py,v 1.5 2004/11/30 02:27:46 ianwill Exp $
 
32
# $Id: slp_import.py,v 1.7 2005/12/19 17:21:55 ianwill Exp $
33
33
#
34
34
# +---------------------------------------------------------+
35
35
# | Copyright (c) 2004 Anthony D'Agostino                   |
36
36
# | http://www.redrival.com/scorpius                        |
37
37
# | scorpius@netzero.com                                    |
38
38
# | May 3, 2004                                             |
39
 
# | Released under the Blender Artistic Licence (BAL)       |
40
 
# | Import Export Suite v0.5                                |
41
 
# +---------------------------------------------------------+
42
39
# | Read and write SLP Triangle File Format (*.slp)         |
43
40
# +---------------------------------------------------------+
44
41
 
45
 
import Blender, mod_meshtools
 
42
# ***** BEGIN GPL LICENSE BLOCK *****
 
43
#
 
44
# This program is free software; you can redistribute it and/or
 
45
# modify it under the terms of the GNU General Public License
 
46
# as published by the Free Software Foundation; either version 2
 
47
# of the License, or (at your option) any later version.
 
48
#
 
49
# This program is distributed in the hope that it will be useful,
 
50
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
51
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
52
# GNU General Public License for more details.
 
53
#
 
54
# You should have received a copy of the GNU General Public License
 
55
# along with this program; if not, write to the Free Software Foundation,
 
56
# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
57
#
 
58
# ***** END GPL LICENCE BLOCK *****
 
59
 
 
60
import Blender, meshtools
46
61
#import time
47
62
 
48
63
# ================================
86
101
 
87
102
        objname = Blender.sys.splitext(Blender.sys.basename(filename))[0]
88
103
 
89
 
        mod_meshtools.create_mesh(verts, faces, objname)
 
104
        meshtools.create_mesh(verts, faces, objname)
90
105
        Blender.Window.DrawProgressBar(1.0, '')  # clear progressbar
91
106
        file.close()
92
107
        #end = time.clock()
93
108
        #seconds = " in %.2f %s" % (end-start, "seconds")
94
109
        message = "Successfully imported " + Blender.sys.basename(filename)# + seconds
95
 
        mod_meshtools.print_boxed(message)
 
110
        meshtools.print_boxed(message)
96
111
 
97
112
def fs_callback(filename):
98
113
        read(filename)