Global Timeshift/Timewarp Overirde?

   1643   2   1
User Avatar
Member
408 posts
Joined: June 2015
Offline
Is there a way to override all timeshift nodes present in a scene, or even timewarp/stop all animations in an entire scene all at once?

Cheers,

A.
Edited by Adriano - April 28, 2018 01:44:43
User Avatar
Member
69 posts
Joined: Nov. 2016
Offline
You can use Python to find every nodes of a particular type and bulk apply the parameters.

You can execute it with the Python Source Editor (just remember if you save the code as Houdini will execute it every time you load the file if I'm not mistaken) or creating your own Python input window: http://www.tokeru.com/cgwiki/index.php?title=HoudiniPython#Make_a_general_python_input_window [www.tokeru.com]

import hou

# Generate a list of all the nodes that match the type
# Do take care of nodes like transform where it is known as xform
nodes = hou.nodeType(hou.sopNodeTypeCategory(), "timewarp")

for node in nodes.instances():
    # whatevernodehere.parm("paramaternamehere").eval() to retrieve the value
    print node.parm("preextend").eval()
    # blablanodehere.parm("parmyouwanttochange").set(thevalueyouwant)
    node.parm("postextend").set(1)

If you use MaxScript before, Python is the “MaxScript” for Houdini (minus the handy listener)!
Edited by huey_yeng - April 28, 2018 12:19:36
User Avatar
Member
408 posts
Joined: June 2015
Offline
Thanks a lot for helping. I have zero coding experience, as i can't really count the bit of vex i'm learning along the way with Houdini, so this isn't going to be a comfortable experience. But i'll give it a try for sure… HOwveer in the meanwhile i've just set up a Timeshift/Timewarp nodes at the end of all my geos networks in the scene with pasted relative references values pointing at an empty geo with a main timeshift/timewarp control in there. Bit dirty and painful to copy/paste node in the gazillion geos in my scene… but it does the trick. But a bit of python to automate the task sounds a lot simpler, i'll dive into the necessary bits soon.

Cheers,

A.
Edited by Adriano - April 29, 2018 01:54:00
  • Quick Links