How to stop pickPoint()?

Become a member of the CGSociety

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

Thread Tools Display Modes
  02 February 2006
Post How to stop pickPoint()?


How can I stop the pickPoint() operation, e.g. if the user clicks on another button before he finished picking a point as he's supposed to:

    on someButton pressed do (
 	p1 = pickPoint()	  -- wait for user to pick a point
    on anotherButton pressed do (
 	-- user pressed another button before he 
 	-- finished the last pick point operation, so:
 	stop_Pick_Point()	   -- but how???
 	-- pick another point will not work while 
 	-- another pickPoint operation is in progress...
 	p2 = pickPoint()	 

Does anybody has a solution for this?

  02 February 2006

You can disable the second button and enable it as soon as the user gives the first point. For example youo create the ui like this

button b1 "First Point" 
button b2 "Second Point" enabled:false

Now when you handle the first point pick enable the second button like this.

on b1 pressed do 
   p1 = pickpoint()
   b2.enabled = true
on b2 pressed do
   p2 = pickpoint()   

Hope this helps
  02 February 2006
Thank you mobeen!
I tried to work around like you described it. But the result ist not satisfying because the user always has to click right inside the active viewport in order to stop the operation.
I think I'm trying the "on tool create" events instead...
  02 February 2006
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 01:57 AM.

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