Query a ropfetch node for progress/completion state w/python

   2014   2   1
User Avatar
Member
7 posts
Joined: Oct. 2015
Offline
Hey there

I'm just starting to get my head into TOPs-land. I want to run a pythonscript TOPs node when the incoming node (which is ropfetch node) is complete. Right now, no combination of "Generate When" and "Evaluate Script During" seems to get the python script to run only AFTER the incoming node is complete. I hope to get around this by having python script itself check whether the incoming node has completed cooking. So far though using:


rf = hou.node(".").input(0)
print(rf.getCookState("force"))

...only ever tells me that the node is cooking, unless I manually dirty the python node after everything is complete then run just that. Then I get "cooked" as the answer.

Any thoughts or suggestions would be very much appreciated.

Cheers

Jeff
Edited by splintersilk - March 8, 2021 21:27:12
User Avatar
Staff
600 posts
Joined: May 2014
Offline
Use a wait for all TOP after your ROP fetch. It will create a single work item that waits for all input work items to complete before being marked as completed itself. Then, connect your Python Script node after that.
User Avatar
Member
7 posts
Joined: Oct. 2015
Offline
Thanks for the absurdly fast and helpful response @tpetrick! I moments earlier heard the same from mestela and was about to reply to this thread with the same info. Cheers!
  • Quick Links