« JPEG compression control in Maya | Main | How to “ungroup” the passes within open EXR format »



Feed You can follow this conversation by subscribing to the comment feed for this post.

Wow Sven!!

That's the best Maya trick ever!!

I've looking for a way to interrupt Maya scripts for a decade!!!

Thanks a lot man!!!

why not use the progressBar function?
It looks nice and allows you to interrupt your script, all native to Maya.

for example:
global string $gMainProgressBar;
int $maxPBar = 10000;
progressBar -e -bp -ii 1 -max $maxPBar $gMainProgressBar;

for($i=0; $i < $maxPBar; $i++)
if(`progressBar -q -ic $gMainProgressBar`)

// here goes you code

progressBar -e -s 1 $gMainProgressBar; // increases the progress bar

progressBar -e -endProgress $gMainProgressBar; // call this when you stop the script or when the script is done

That's a really clever hack for doing this, thanks for sharing!

The comments to this entry are closed.

RSS Feed

  • Subscribe


  • Bookmark and Share