Export single object XYZ?

Hi all! I’m very new to Blender. First heard about it 2 weeks ago. I wonder, is there a way to export ONLY the XYZ coordinates from the verticees of a selected object? I went through all the export functions, and several of them will do this, albeit with loads of extra information that I won’t be using anytime soon. I got close, but didn’t find exactly what I wanted. If this can’t be done…is there any way to script that myself? Where to start? Thanks, and have a great day! :smiley: -Langecrew-


from Blender import Scene
import BPyMesh
scn = Scene.GetCurrent()
ob = scn.getActiveObject()
me = BPyMesh.getMeshFromObject(ob) # gets a mesh from the object with modifiers applied, also so transform wont effect the original mesh data.
me.transform(ob.matrixWorld) # transforms the mesh by the loc/size/rot of the object

file = open('/home/me/somefile.txt', 'w') # 'c:\\somefile.txt' for win32, 'w' if so we can write it.
for v in me.verts:
    file.write('%.6f %.6f %.6f
' % (v.co.x, v.co.y, v.co.z))
file.close()

Cool, Thanks!! happy holidays, -Langecrew-