more updates, mostly 2.3 error checking, nice messages when pythons not installed and some nendo import optimizations.

BPyMesh will work with the exception of the redux function in py2.3
This commit is contained in:
2006-07-03 20:17:40 +00:00
parent 64ff9ae4a8
commit c4b4e2922f
6 changed files with 106 additions and 71 deletions

View File

@@ -41,7 +41,10 @@ Run this script from "File->Import" and select the desired PLY file.
# 2.32.
import Blender, meshtools
import re, struct, StringIO
try:
import re, struct, StringIO
except:
struct= None
class element_spec:
name = ''
@@ -301,5 +304,19 @@ def filesel_callback(filename):
message = 'Successfully imported ' + Blender.sys.basename(filename) + ' ' + str(Blender.sys.time()-t)
meshtools.print_boxed(message)
Blender.Window.FileSelector(filesel_callback, 'Import PLY', Blender.sys.makename(ext='.ply'))
def main():
if not struct:
Blender.Draw.PupMenu('This importer requires a full python install')
return
Blender.Window.FileSelector(filesel_callback, 'Import PLY', '*.ply')
if __name__=='__main__':
main()