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 $
34
34
# +---------------------------------------------------------+
35
35
# | Copyright (c) 2004 Anthony D'Agostino |
36
36
# | http://www.redrival.com/scorpius |
37
37
# | scorpius@netzero.com |
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
# +---------------------------------------------------------+
45
import Blender, mod_meshtools
42
# ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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.
58
# ***** END GPL LICENCE BLOCK *****
60
import Blender, meshtools
48
63
# ================================
87
102
objname = Blender.sys.splitext(Blender.sys.basename(filename))[0]
89
mod_meshtools.create_mesh(verts, faces, objname)
104
meshtools.create_mesh(verts, faces, objname)
90
105
Blender.Window.DrawProgressBar(1.0, '') # clear progressbar
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)
97
112
def fs_callback(filename):