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

07/04/2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a01156fc44c77970b01156f000c88970c

Listed below are links to weblogs that reference interrupting or aborting a MEL script:

Comments

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

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

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`)
{
break;
}

// 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

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!!!

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

RSS Feed

  • Subscribe

Google Search

Share

  • Bookmark and Share