Vertex pos to CSV

0 votes
Version: 
1.0

-- built by bernardo amorim
-- help at bernardo dot amorim at gmail dot com
-- hugs bern
-- 2009

MacroScript vertexToCSV category:"bernielomax CSV"
(

out_filename= getSaveFileName caption:"SAVE WHERE" initialDir:"$export" filename:"VertexPos.csv"

out_file = createFile out_filename

for obj in geometry do (
tmesh = snapshotAsMesh obj
format "Obj Name:%\n" obj.name to:out_file

format "X Pos, Y Pos, Z Pos\n" to:out_file

for v = 1 to getNumVerts tmesh do

(
vert = getVert tmesh v
format "%, %, %\n" vert.x vert.y vert.z to:out_file
)
delete tmesh
)

close out_file

edit out_filename

)

Additional Info: 

made for some animation project I had going on

bern

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cemxetqin's picture

numbers

We found the script you wrote below, it works without any problems but the output of the "vert.y" is; "4.55203e + 06".
We want to print this as 45111.0. How do we fix the code?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.