Need help with mesh to text export script.

I followed the blendercookie tutorial on exporting to text a mesh. I have problems with opening a file. I copied how other add-ons work, and it still had problems.

I could really use the help. I’m trying to use it as a tool in order to write other scripts and reuse mesh data.

silvermindyarr, check out the variation of the script I posted after watching the tutorial:

I instead write the face data and vertex data to text blocks within Blender. I suggest changing my script so that the text block name matches the object name.

Hope this helps!

any chance of being able to export the materials and textures values too?

but this may be a lot more complicated and not realist may be!

happy 2.5

For materials, of course you could. That would be pretty simple. Just iterate through the material properties you’re interested in and print their values to a file. As for textures, it would work the same as long as they’re procedural. Of course for textures from a loaded image, well, you just have the file.

I’m just not sure what use it would be to save these mat/tex parameters to a file when you can just link or append them from an external .blend.

But if you mean you want to create - ultimately - a script that uses the materials or textures you had saved, then you can create procedural textures and materials within your python script.

just wondering
there is another little sript like that i think where you can export the mesh to txet edtior and re use it to make a new primitive
but it does not have the mat and text

so i was wondering how it could be added if not too long and complicated

in the sense that for mat you need to spec all the specific things like color reflec ect…
i mean it’s a lot of variables to be pass and properly identifiy to be re use dlater by a primitive
so not certain if practical

when i do a primitive i already have some functions to define whatever mat iand texture and it can take quit a lot of space!

happy 2.5