View Full Version : script detects when a curve is being drawn
Hello everybody.
I've been having a trouble trying to find a way to put the script on pause while the user draws a curve, after resumes the script when the user done.
I think script job could do it, but I cannot find the right event (when a curve is created or and object)
thank you for your help
hto
|
|
Irakli
06-01-2009, 10:19 PM
Maybee
pause; command will help you?
thanks Irakli,
but I'm not sure if that could work.. I would like to resume the script, after a new curve is created. not with time..
Thank you for your tip, though
cheers.
hto
mlefevre
06-02-2009, 08:16 AM
Hi hto,
As you've said, script job is one option.
You can use the curve context command (CV or EP) to access the curve tool, and use the event 'ToolChanged' to trigger another procedure. I suppose you'll end up splitting up your proc into two. Just use arguments if you have to pass anything on.
if(`window -exists myWin`)
deleteUI myWin;
window myWin;
columnLayout myCol;
button -c "procOne()" myBut;
showWindow myWin;
proc procOne()
{
print "\n..start of script..\n";
print "\n..draw curve..\n";
$curCtx = `curveCVCtx -degree 3`;
setToolTo $curCtx;
scriptJob -ro 1 -e "ToolChanged" "procTwo()";
}
proc procTwo()
{
print "\n..curve is drawn, continue with script..\n";
print "\n..done..!\n";
}
hello mlefevre,
Thank you for your example. was really helpful.
all the best.
hto
CGTalk Moderation
06-02-2009, 09:56 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.