Hi, I don't know much about MMaxscript, but I'm trying to make an exporter that is basically the same as a .obj export, but it will be able to handle frames, for easier animation on a program I am working on.
This is as far as I have got from reading a few posts here and modifying some bits I found.
--------------------------------------------------------------------------
out_name = ("directory/myfile.txt")
out_file = createfile out_name
vStartFrame = animationrange.start
vEndFrame = animationrange.end
for obj in geometry do
(
format "Number of Frames %\n" vEndFrame to:out_file
for t = vStartFrame to vEndFrame do
(
tmesh = at time t snapshotAsMesh obj
format "Current Frame %\n" t to:out_file
// I think this is right
for v = 1 to getNumVerts obj do
(
vert = getVert tmesh v
format "Vert %, %, %\n" vert.x vert.y vert.z to:out_file
)
for v = 1 to getNumTVerts obj do <--- is this right for getting
the texture cords(UVW?)?
(
TVert = getTVert tmesh v
format "TVert %, %, %\n" tvert.x tvert.y tvert.z to:out_file
)
// I think this is right
for v = 1 to getNumFaces obj do
(
Face = getFace tmesh v
format "Face % % %\n" Face[1] Face[2] Fac[3] to:out_file
)
)
close out_file
--------------------------------------------------------------------------
So Was hoping to end up with a text file similar to .obj
Number of frames 100
Current Frame 1
v 12312 12312 12312
vt 12312 12312 123123
vn 123123 12312 12312
f 123 1 123
Any help would be appreiated.
Thanks in advance Derek
EDIT - So i fixed the faces part(well i think so), also I'm wondering if i need vertex normals or just face normals, the text file will be read by my program then converted to display models in an OpenGL java binding. Any Ideas?