Advertisement

Blender Model Not Exporting to .x

Started by October 16, 2007 04:43 PM
4 comments, last by Oluseyi 17 years, 3 months ago
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! 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. At first I assumed there was a problem with the .x exporter script, but now I think it's a problem with the model in Blender. Perhaps something to do with the bones and mesh not being properly linked together, or vertex groups, or... well... I just don't know. I'm learning all of this as I go. Perhaps someone could take a look at my blend file in Blender and let me know if there are any obvious problems? I could email it to you. You have no idea how much I would appreciate it. --------------------------------------------- Compiled with Python version 2.5. Checking for installed Python... got it! exporting... 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.writeSkinWeights(arm,mesh) #self.file.write(" } // End of the Frame %s \n" % (ch_obj.name)) self.file.write(" } // End of the Object %s \n" % (ch_obj.name))
Seems like either the authors of the exporter forgot to make proper object type checks or the script is stale, that is, written for an older Blender version, but carried over.

I think you'll have to update the script to use the newest syntax, or write your own exporter.
Advertisement
I took a look at my copy (which seems not to match the line numbers), the problem is a lack of object type checks on the object returned by getArmChildren.
Is there a reason you created a new thread to ask the same question as your existing thread does? We frown on cross-posting here.
Yes, it's because I originally thought the problem was with the script and felt I would get an answer in the script section. 9 days later I decided the problem was with my model setup in Blender, so I then felt I wouldn't get a response in the script area. Turns out I was right about the problem. I figured out the python just enough to add some debugging and it turns out it came down to a simple error (as always): The armature has to be the parent of the mesh and not visa versa.

I'm very aware of the cross posting issue. I thought about it and decided this was a good enough reason. I appologize if not.

- C
Alright. Just wanted to be sure. Glad you fixed your issue.

This topic is closed to new replies.

Advertisement