MaximumsProductions Posted July 29 Share Posted July 29 Hey there, I've been struggling trying to understand houdini's event loops and getting around updating a networkview some timestep. I also haven't been able to find docs about hdefereval. So was curious if anyone might have any tips on how to update function to evaluate some X timestep. As this seems to be almost pseudo random updates but I probably don't understand some foundational knowledge of threads and processes. Here's an attempted example of a node updating pos, every x time. but its not quite right. (press enter to cancel out of in python shell, and I recommend not running too long as I assume there's more going on than I realize) import hou import threading import time def create_object(): obj_node = hou.node("/obj") geo_node = obj_node.createNode("null", "test_object") def object_move(): geo_node = hou.node("/obj/test_object") geo_node.move((0, 0.5)) def update_thread(): cancel = False def update(): if cancel: return print("Update function called") object_move() timer = threading.Timer(.1, update) timer.start() timer = threading.Timer(.1, update) timer.start() input("Press Enter to cancel the thread") cancel = True timer.join() create_object() update_thread() 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.