Message 1 of 10
Help with mel progressBar, progress bar can be cancelled before it's started?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a basic progress bar example here straight from the Maya help file. I'm having a problem though if I press Esc before I run the script the -isCancelled state is set to true which makes no sense, since the progress bar doesn't exist yet. What am I doing wrong here, because if I run this script once and let it finish everything is fine, but if I then press Esc before running it and run it again it thinks I tried to escape it in the middle of the loop which makes no sense. This seems totally broken?
global string $gMainProgressBar;
int $number = 100000;
progressBar -edit -beginProgress -isInterruptable true -status "Example Calculation ..." -maxValue $number $gMainProgressBar;
int $i;
for($i=0; $i < $number; $i++)
{
if(`progressBar -query -isCancelled $gMainProgressBar`)
break;
progressBar -edit -step 1 $gMainProgressBar;
}
progressBar -edit -endProgress $gMainProgressBar;