Jason Posted September 30, 2009 Share Posted September 30, 2009 Hi all, I'm playing about with some python which I'd like to cook within the event loop of Houdini. I'd like to cause certain SOPs to cook all the time, as I'm trying to do some kind of realtime stuff. Has anyone done this before? Should I try to dirty a SOP so that it'll cook? Should I force-cook a SOP? Does anyone have any ideas or experience doing that from within the event loop? Thanks. Jason Quote Link to comment Share on other sites More sharing options...
Wolfwood Posted October 5, 2009 Share Posted October 5, 2009 Wooo. Interesting. I see... hou.ui.addEventLoopCallback() hou.ui.triggerUpdate() hou.Node.cook(...) So.... Doing this def rtCook(): hou.node("/obj/geo1/add1").cook(True) hou.ui.addEventLoopCallback(rtCook) Is making my Add SOP cook like a busy little bee. I require sleep but hopefully this inspires various evilness. Quote Link to comment Share on other sites More sharing options...
caleb Posted October 14, 2009 Share Posted October 14, 2009 (edited) Neat! Two questions... What do you use to navigate the HOM to search for functions like the three you mention? You say "I see...", but what did you do to see those? Do you see anything that will limit the recooking to only happen when something changes (like an object is moved, or a viewport is tumbled. Thanks! -caleb [edit: "Peon" - nice!] Wooo. Interesting. I see... hou.ui.addEventLoopCallback() hou.ui.triggerUpdate() hou.Node.cook(...) So.... Doing this def rtCook(): hou.node("/obj/geo1/add1").cook(True) hou.ui.addEventLoopCallback(rtCook) Is making my Add SOP cook like a busy little bee. I require sleep but hopefully this inspires various evilness. Edited October 14, 2009 by caleb Quote Link to comment Share on other sites More sharing options...
Jason Posted October 15, 2009 Author Share Posted October 15, 2009 Thanks for this, Jim! Working like a charm! 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.