I'm quite new in the blender and many things I do not understand yet. I would like to extract the coordinates of each vertex in CSV Well... I'm trying to use this script, but I can not make it work, supposedly copying / pasting it and pressing the "run" button should work, but there's no way.
Surely it is a very basic question, but the truth is, I have no idea.
I do not even know how to write the code correctly on this page :( (but I just found out ^^ )
import bpy outputFile = 'C:/someFolder/mesh.csv' verts = [ bpy.context.object.matrix_world * v.co for v in bpy.context.object.data.vertices ] csvLines = [ ";".join([ str(v) for v in co ]) + "\n" for co in verts ] f = open( outputFile, 'w' ) f.writelines( csvLines ) f.close()
It always gives the same error in line #9 :
Thanks for reading this, any help will be very grateful. A greeting!