trcsilva
05-19-2008, 10:24 AM
Hi there,
I am new to 3DS Max, so I think this is going to be a pretty simple question for you guys...
I have a cartography map made of splines in 3DS Max, and I need to store the splines' vertices positions in a TXT file, but all I get is a blank file...
this is the script I am using
clearselection()
out_name = ("c:/testmesh.txt")
out_file = createfile out_name
for o in objects do --all the objects in the scene
(
local theMesh = snapshotAsMesh o
for v = 1 to getNumVerts theMesh do --loop through all vertices
(
vert = getVert obj v --get the v-th vertex
format "%\n" vert to:out_file
)
delete theMesh
)
close out_file
edit out_name
what am I doing wrong?
Thx in advance.
I am new to 3DS Max, so I think this is going to be a pretty simple question for you guys...
I have a cartography map made of splines in 3DS Max, and I need to store the splines' vertices positions in a TXT file, but all I get is a blank file...
this is the script I am using
clearselection()
out_name = ("c:/testmesh.txt")
out_file = createfile out_name
for o in objects do --all the objects in the scene
(
local theMesh = snapshotAsMesh o
for v = 1 to getNumVerts theMesh do --loop through all vertices
(
vert = getVert obj v --get the v-th vertex
format "%\n" vert to:out_file
)
delete theMesh
)
close out_file
edit out_name
what am I doing wrong?
Thx in advance.
