Feedback

What's your question?

By: [ Editor ] Asked

(Windows) Set Maya playblast compression option in MEL

Maya Version 2009 (though earlier and later solutions might work)

I've got a script which renders 10 smallish images using Playblast. For hundreds of animations. In Playblast using Avi, and Full Frames, it's up to 10 times faster than Maya HW render. So I want to stick with Playblast (and HW render has the same problem anyway).

Here's the problem: I can't figure out how to set the compression using MEL, System or anything else. If I use the Playblast -compression none setting, it has no effect.

This tool will be used by a large body of animators, and I can't rely on them to manually set the compression in Playblast, and when some other compression is used, it slows the Playblast down unacceptably.

When an animator selects the compression type, where is it stored? How can I access and change it? Can it be done through MEL? Can it be done through a Windows command? Can it be done in Python? I'm fluent in all of them, and I've found NOTHING on the web, as if I'm the first one to try something like this, which would be mind boggling if true.

Thanks for any help in advance.

Edit: I couldn't add a comment but I tried the first answer with no joy.

Sadly, this doesn't work. When I set it to "Cinepak", close, reopen, and set the optionVar as above, it is still set to Cinepak. When I close it and check the userPrefs.mel file, it says it is set to "none". When I use optionVar -q "playblastCompression"; as above, it says it is set to none, but when I render or check the Playblast options through the menu it is still set to Cinepak!

Setting Playblast options in Windows XP in Maya 2009 (which I'm stuck with for the project) seems to have no effect on the optionVar. At least when it comes to "playblastCompression".

I can do a Playblast, check it's format, it's in Cinepak codec, and the optionVar still says it is set to "none". Restart, check the optionVar, "none". Playblast...it's in Cinepak. Check the optionVar, and "playblastCompression" claims it is set to "none".

Add comment viewed 1,088 times Latest activity 10 months ago

or Cancel

1 answer

  • 0

julian [ Admin ]

There is an optionVar (playblastCompression) that stores the compression setting when you change it in the UI.

To see what its currently set to:

string $pbCompression = `optionVar -q  "playblastCompression"`;
// Result: H.264 // 

To change it:

optionVar -sv "playblastCompression" "Animation";
optionVar -sv "playblastCompression" "none";

Then playblast and it should write in the format the optionVar is set to.

or Cancel