exporter with modifiers and vertex influences?

i would like to write a mesh exporter that takes modifiers into account and supports vertex influences. with 2.49 this wasn’t possible, since the vertex influences were only available with object.getData() (mesh not influenced by modifiers) but not with mesh.getFromObject() (mesh influenced by modifiers).

is there a way to do this now in 2.55? how would you solve this? i think it’s very inconvenient for the user if modifiers have to be applied manually before export. some users probably would save the file afterwards by mistake and then can’t go back anymore. :stuck_out_tongue:

if this doesn’t work in any other way, maybe i could copy the object, apply the modifiers, export it and finally delete it, all by script? could this be done in 2.55? could this be done in 2.49? since i guess i still have to work with 2.49 for a while for this project.

thats basically how it works. but there is a function that does that for you:

export_mesh = obj.create_mesh(scene, True, 'RENDER')

the arguments “True” and “‘RENDER’” control whether and how to apply the modifiers.
But as this is a copy of your original mesh you need to delete it after you’ve exported it.

bpy.data.meshes.remove(export_mesh)

note: this is for 2.55. I don’t know how it used to work in 2.49.

yes, but can i get the vertex influences then? or are they missing like with the 2.49 mesh.getFromObject()?

The vertex weights? I don’t know. Never tried that. But i guess you could try any export script. They all should use this method.

yes, the vertex weights.

hm… with what export/import script should i try though? i think none supports exporting/importing bone animation. without importing it’s hard to check if the wanted data is there.

doesnt fbx support bone and bone weight data

you can export animation so i dont see why not

does it support bone weight data and at the same time a modifier like edgesplit (without applying it)?