PDA

View Full Version : How to save objs from max script?


BrianK_CA
11-04-2005, 02:47 AM
I need to save an obj file for each frame of my animation. I can't seem to find how to save an obj (or any file type, for that matter) in maxscript.

I'm also having a bit of a time learning how to iterate through frames with maxscript. I can get the current frame, the start and end frame, but how do I increment currentTime so I can work on frame 2, 3, 4, and so on?

Any help is much appreciated.

Blue
11-04-2005, 06:03 AM
In the MAXScript Reference look up the exportFile comand.
exportFile "fileName.obj" #noPrompt
This will export the scene out to a file named fileName.obj to <maxDir>\meshes directory, you can specify another directory in the filename using an absolute path. The #noPrompt flag forces the export to use the last configuration of the exporter and supresses the export dialog.

If you want to export a selected object there is a flag for that as well.
exportFile "fileName.obj" selectedOnly:true #noPrompt

CarlosA
11-06-2005, 02:04 PM
I need to save an obj file for each frame of my animation. I can't seem to find how to save an obj (or any file type, for that matter) in maxscript.

I'm also having a bit of a time learning how to iterate through frames with maxscript. I can get the current frame, the start and end frame, but how do I increment currentTime so I can work on frame 2, 3, 4, and so on?

Any help is much appreciated.

sidertime = the frame you want to be at
current time is a read only varible and it canot be set.

CGTalk Moderation
11-06-2005, 02:04 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.