Using ProgressStart.. have to confirm twice to actually cancel

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  06 June 2013
Using ProgressStart.. have to confirm twice to actually cancel

I'm in max 2012. Trying to use progressStart/progressUpdate/getProgressCancel/ProgressEnd
After hitting cancel or escape, it makes me hit yes twice OR even sometimes thrice to confirm that I do actually want to stop. I've cut the script right down to pretty much just the progressbar functionality and I'm still having the issue. Anyone know a way to get it to behave?


 	animationrange = interval 0f 1000f
 	progressStart "Uh huh"
 	for i = 1 to 1000 do
 		slidertime = i
 		progressUpdate (i/10.0)
 		if getprogresscancel() do exit
Not bad. For a hughman.
  06 June 2013
Originally Posted by MaxscriptReference:
progressUpdate <percent>
Updates the bar display to show the given percentage complete (in the range 0-100). This function also checks to see if the user has clicked the Cancel button in the progress bar and returns true if the computation should continue and false if the user has requested a cancel. You can also call getProgressCancel(), described below, to check the cancel status, which is a low overhead function and so may be called more frequently than progressUpdate().

A low-overhead function that checks whether the user has canceled the operation via the Cancel button in the progress bar. You may want to call this function frequently within deep loops in your code to reduce cancel latency for the user, because you should only call progressUpdate() as needed to show significant progress bar changes to keep overhead low. The getProgressCancel() function, as well as progressUpdate(), displays a confirmation dialog if the use hits the cancel button and returns the cancel status from that confirmation. UnlikeprogressUpdate(), this function returns true if the user has made a confirmed cancel request and falseotherwise.

basically you are actually doing the cancel check twice, once with progressUpdate and once with getProgressCancel()
  06 June 2013
Doh, I should read the help file properly.

Thanks Joel,

Not bad. For a hughman.
  06 June 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:48 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.