Blender .x Exporter Not Working for Animated Model.

Topics: Developer Forum, User Forum
Oct 16, 2007 at 7:32 PM
I've been having problems for more than a week and I'm way behind on my project. While I've had no problems with plain meshes in the past, I can't get Blender to export my animated model at ALL! People seem to be doing it, but perhaps they are using a different .x exporter. I get the error below. I'm completely lost when it comes to python, so I just don't know what to do to fix the problem.


Compiled with Python version 2.5.
Checking for installed Python... got it!
Traceback (most recent call last):
File "<string>", line 162, in draw
File "<string>", line 76, in my_callback
File "<string>", line 388, in SelectObjs
File "<string>", line 346, in writeObjFrames
File "<string>", line 511, in writeRootBone
File "<string>", line 479, in exportMeshArm
AttributeError: 'NoneType' object has no attribute 'getData'


#Export Mesh with Armature
def exportMeshArm(self,arm,armob,chobj):
tex = []
(479) mesh = ch_obj.getData()
self.writeTextures(ch_obj, tex)
self.writeMeshcoordArm(chobj ,armob)
self.writeMeshMaterialList(ch_obj, mesh, tex)
self.writeMeshNormals(ch_obj, mesh)
self.writeMeshTextureCoords(ch_obj, mesh)
#self.file.write(" } // End of the Frame %s \n" % (
self.file.write(" } // End of the Object %s \n" % (
Oct 17, 2007 at 1:16 AM
Problem fixed. I figured out the python just enough to add some debugging and it turns out it was a simple error (as always): The armature needs to be the parent of the mesh and not visa versa.


Now I'm getting this when I try to run my app:
Failed to parse System.Int32 at token number blah blah blah...

But I think I saw something about that somewhere, so I'll go try to find that thread. Not sure what site I saw it on.

~ C