[Maxscript] Getting at the extra settings in the Make Animation Preview dialog

My studio has tasked me with creating a dummy proof animation preview button for the animators, and I’ve yet to come up with something that works. I tried modifying the quick screen grab code that’s been around in the maxscript tuts for a while, but it looks kinda ugly and the studio wants it cropped properly instead of using the viewport dimensions because they can throw it into the edits as placeholders until the final render is done.

I can use the updated controls for the createPreview command, but it’s kind of useless without being able to access and assign the proper codec, file type, name and location. I spent a large chunk of time yesterday digging around the Max files trying to location the script for the make animation preview rollout to see what commands it uses to set these, but I couldnt find it.

Last night after work I thought about cheating and let Max blast out an AVI in the previews folder and then have it copy the file, rename it, and delete the old one. That just seems like extra work when it appears that the preview rollout allows you to directly save out a .mov file. Even if this is what I have to do, there still isn’t any way to directly assign a codec and compression level in the event an animator has been messing with the settings.

Anyone have any advice on this? Basically the studio wants a tool where the animators hit a button and it creates a .mov playblast named based on the file in the same directory as the file. I can script all this stuff with the render settings and have developed various file save systems, but I’ve never worked with the anim preview settings because before 2013 there were no controls to access it.

[QUOTE=Dstinct;29181]
…cheating and let Max blast out an AVI in the previews folder and then have it copy the file, rename it, and delete the old one. That just seems like extra work …[/QUOTE]

This what I ended up doing. Max Script (as off 2013) has limited access to the preview settings.
with MXS createPreview You cannot :
[ul]
[li]control where the generated preview goes or what it is named[/li][li]change codec settings (will always be the last chosen)[/li][li]tell Max weather or not to play the preview[/li][/ul]

so I just copy & rename the result to what I want
For choosing your codec, a lot of people go with HiddenDosCommand + some command line AVI utility like ffmpeg
For choosing the settings in max script, the only option is to dive into UIAccessor and start forcing the button clicks.

Half implemented stuff like this is why i miss Maya…

Something of particular note is that preview rendering in any stylized mode will not correctly render skinned meshes moving far from their bind position (typically center of the world).

[QUOTE=Mambo4;29196]This what I ended up doing. Max Script (as off 2013) has limited access to the preview settings.
with MXS createPreview You cannot :
[ul]
[li]control where the generated preview goes or what it is named
[/li][li]change codec settings (will always be the last chosen)
[/li][li]tell Max weather or not to play the preview
[/li][/ul]

so I just copy & rename the result to what I want
For choosing your codec, a lot of people go with HiddenDosCommand + some command line AVI utility like ffmpeg
For choosing the settings in max script, the only option is to dive into UIAccessor and start forcing the button clicks.

Half implemented stuff like this is why i miss Maya…[/QUOTE]

Just saw this. Don’t know why I didn’t get a response notification. I figured this is what I would have to do. Oh well.