mlesin Posted March 26, 2007 Share Posted March 26, 2007 My SOP node is cooking long time. I think it'd be great to add a dialog about what is happening and ability to interrupt it, but I can't get how to do that. I've tried to redefine OP_Node::getCookTimerLabel() and use start/stopCookTimer() inside my cook method, but dialog still doesn't appear... And, as an ability to interrupt cooking process, I should periodically check wasInterrupted() function, right? Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 26, 2007 Share Posted March 26, 2007 (edited) take a look at this sop uv uniform It uses the cooking dialog and interrupts from UT_Interrupt.h UT_Interrupt *boss; //check for user interrupts boss = UTgetInterrupt(); boss->setEnabled(1, 0); boss->setAppTitle("UVuniform"); boss->setLongOpText("Fetching uvs"); boss->setLongPercent(0); boss->setInterruptable(1); boss->setLongOpText("smoothing grid"); boss->setLongPercent(0.1); test = boss->opInterrupt(5); Edited March 26, 2007 by sibarrick Quote Link to comment Share on other sites More sharing options...
Jason Posted March 26, 2007 Share Posted March 26, 2007 Hey Simon, Do you find that the LongText stuff gets output to stdout if you're executing from within hscript or rscript? Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 27, 2007 Share Posted March 27, 2007 I've never tried it.... Quote Link to comment Share on other sites More sharing options...
mlesin Posted March 27, 2007 Author Share Posted March 27, 2007 Thanks, that helped a lot! take a look at this sopuv uniform It uses the cooking dialog and interrupts from UT_Interrupt.h UT_Interrupt *boss; //check for user interrupts boss = UTgetInterrupt(); boss->setEnabled(1, 0); boss->setAppTitle("UVuniform"); boss->setLongOpText("Fetching uvs"); boss->setLongPercent(0); boss->setInterruptable(1); boss->setLongOpText("smoothing grid"); boss->setLongPercent(0.1); test = boss->opInterrupt(5); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.