Useful Playblast MEL Script

Hey all just a quick little MEL script that I’ve found to be quite useful as of late. I had found that it was becoming quite annoying every time that I wanted to test an animation in a playblast. When ever I wanted to do this I had to turn go to Show>NURBS Curves and uncheck them, then I had to manually go to the Window>Playblast menu to create a playblast. One of the lessons I was doing in Digital Tutors suggested as a way to speed up this process was to create a simple MEL script to do this for you. However, the lesson did not provide this script so I did some searching and managed to put together a pretty decent and quick little script to do just this.

It will turn off all the NURBS Curves on your current model and then create a playblast using fCheck. I then just made it into a hotkey button and placed it on my shelf. It has become quite useful. Hope you all it enjoy!

Code Below:

string $panel = `getPanel -wf`; modelEditor -e -nurbsCurves (!`modelEditor -q -nurbsCurves $panel`) $panel;
playblast -format image -clearCache 1 -viewer 1 -showOrnaments 0 -fp 4 -percent 100;