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 CLOSED
 
Thread Tools Search this Thread Display Modes
Old 06 June 2013   #1
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?

Cheers,
Cg.

Code:
( animationrange = interval 0f 1000f progressStart "Uh huh" for i = 1 to 1000 do ( slidertime = i progressUpdate (i/10.0) if getprogresscancel() do exit ) progressEnd() )
__________________
Not bad. For a hughman.
 
Old 06 June 2013   #2
Quote:
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().

getProgressCancel()
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()
 
Old 06 June 2013   #3
Doh, I should read the help file properly.

Thanks Joel,

Cg.
__________________
Not bad. For a hughman.
 
Old 06 June 2013   #4
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.
 
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 08:52 PM.


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