==scripts ==

latest update of Direct X 8 exporter by Ben Omari
This commit is contained in:
2006-04-18 22:56:45 +00:00
parent 5759c89668
commit d5b51cde65

View File

@@ -2,7 +2,7 @@
""" Registration info for Blender menus:
Name: 'DirectX(.x)...'
Blender: 241
Blender: 242
Group: 'Export'
Tip: 'Export to DirectX text file format format.'
"""
@@ -452,7 +452,8 @@ class xExport:
self.writeHeader()
self.writeRootFrame()
tex = []
obj = Object.GetSelected()[0]
objs = Object.GetSelected()
for obj in objs:
mesh = obj.getData()
if type(mesh) == Types.NMeshType :
self.writeTextures(obj, tex)
@@ -462,13 +463,14 @@ class xExport:
self.writeMeshTextureCoords(obj, mesh)
self.file.write(" }\n")
self.file.write("}\n")
ind = objs.index(obj)
if ind == len(objs)-1:
self.file.write("}\n")
ip_list = obj.getIpo()
if ip_list != None :
self.file.write("AnimationSet {\n")
self.writeAnimationObj(obj)
self.file.write("}\n")
print "exporting ..."
else :
print "The selected object is not a mesh"
print "...finished"
@@ -779,6 +781,7 @@ template SkinWeights {\n\
#TransformMatrix
mat = self.getLocMat(obj)
name_f = obj.name.replace(".","")
name_f = name_f.replace(" ","")
self.writeArmFrames(mat, name_f)
mesh = NMesh.GetRawFromObject(obj.name)
self.file.write("Mesh {\n")