Code: Select all
fname = bsys.makename(ext=".xsi")
if EXPORT_DIR <> '':
fname = bsys.join(EXPORT_DIR, bsys.basename(fname))
Blender.Window.FileSelector(export_xsi, "Export SoftImage XSI", fname)
Also, it might be nice to truncate precisions to 3-4 places. If you don't know about it, Python's printf equivalent is here: http://www.python.org/doc/2.3.5/lib/typesseq-strings.html
The console reports:
Code: Select all
Compiled with Python version 2.4.
Checking for installed Python... got it!
File "<string>", line 196
elif type == 'Empty':
^
IndentationError: unindent does not match any outer indentation level
Blender quit
Simply deleting one space from that line fixes the problem! Python errors: sometimes more obscure than perl!
..and fwiw, the triangulation code from xsi_export.py:
Code: Select all
# copy of code to triangulate mesh
##################################
def triangulate_face(f):
if len(f.v) <= 3:
#newFaces = [ [f.v[0].index, f.v[1].index, f.v[2].index] ]
newFaces = [ [f.v[0].index, f.v[2].index, f.v[1].index] ]
mats.append ( f.materialIndex )
else:
#newFaces = [ [f.v[0].index, f.v[1].index, f.v[2].index] ]
#newFaces.append ( [f.v[3].index, f.v[0].index, f.v[2].index] )
newFaces = [ [f.v[0].index, f.v[2].index, f.v[1].index] ]
newFaces.append ( [f.v[3].index, f.v[2].index, f.v[0].index] )
mats.append ( f.materialIndex )
mats.append ( f.materialIndex )
return newFaces