CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 06-14-2013, 02:27 AM   #1
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 657
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
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-14-2013, 04:16 AM   #2
Gravey
3D Dude
Joel Hewitt
Sydney, Australia
 
Join Date: Dec 2005
Posts: 880
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-14-2013, 05:02 AM   #3
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 657
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
Doh, I should read the help file properly.

Thanks Joel,

Cg.
__________________
Not bad. For a hughman.
 
Old 06-14-2013, 05:02 AM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:30 PM.


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