PDA

View Full Version : Automated script for saving max previews


dismember
02-21-2007, 05:35 PM
Hello All

I am trying to create a library of the models I created. I was wondering if there is a automated script or program that can be run, to save out the previews of max files (Like the thumbnail 3dsmax saves when you save the file, although I would prefer it to be a little bigger).

So in summary, this is what I would expect the script to do.

1. I have say 20 3ds max files in a directory
2. I run the program/script within max or outside max (does not matter)
3. The script automatically opens all the files in that directory, saves a preview of the last active viewport with the same file name as max.

I found a script called Vizable_maker which works inside max. It is a nice little script, but I am trying to find something in the same lines THAT IS AUTOMATED

Thanks
Kal

Wahooney
02-25-2007, 03:39 PM
You can use MuFO (http://www.wahooney.net/download.php?view.50) (Multiple File Operations). It's a script that I wrote that allows one to perform actions on a list of max files.

Just install the script, assign it to a Hotkey/Menu/Toolbar, run it, check the Script checkbox and enter the following script into the script text box:


(
viewport.activeViewport = 4 -- the number of the viewport you'd like to preview
local bm = gw.getViewportDIB()
fname = getDir #renderoutput + "\\preview_" + (getfilenamefile maxFileName) + ".jpg"

bm.filename = fname
save bm
)


I hope that helps.

dismember
02-26-2007, 05:18 PM
Hello Wahooney

Thanks for the input. I will try this out and let you know.

Thanks
Kalyan

dismember
02-26-2007, 10:37 PM
Hi Keith

The Wahooney tool works wonderfully, although the script you provided me with is not saving out previews.

Am I doing anything wrong here?

Please help.

Thanks
Kalyan

Wahooney
02-27-2007, 09:50 AM
It should be saving it to your 3DSMax8\Renderoutput folder.

If you're not using max8 then the script will have to change a bit.

Does it kick up any errors?

dismember
02-27-2007, 04:48 PM
Genius!

This works. But it works only when I changed the viewport number 1 instead of 4. I guess that is because all my files have single maximized viewport when saved.

Anyways, thank you so much. This script is ideal.

Thanks
Kalyan

Wahooney
02-27-2007, 05:35 PM
It's a pleasure dismember.

This script has helped me out of so many pickles in the past, I'm glad that it can help more people ;)

CGTalk Moderation
02-27-2007, 05:35 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.