Search - User list
Full Version: Can I get the overall cook state easily?
Root » PDG/TOPs » Can I get the overall cook state easily?
EricSheng
I want to get the overall cook state's information like the new PDG toolbar UI. On how many nodes or work items have been cooked, and how many been waiting for cooking.
Now I use code like this:
ctx = node.context
workitems = [i.state for n in ctx.graph.nodes() for i in n.workItems]
completes = workitems.count(pdg.workItemState.CookedSuccess)
And I want to get reported (print some logs) for every work item when it get cooked, so I put the code to the WorkItemStateChange EventHandler.
It works but sometimes the work item hanging on cooking state and never gets cooked. So is there any convenient way to do such thing?
Thanks.
joabs
Which version of Houdini are you using?
EricSheng
joabs
Which version of Houdini are you using?
18.0.391
joabs
Unless you're seeing wrong information in the toolbar or in the TOP nodes, it is safe to assume the events are correct, as both relies on them. You might be running into data race issues, try using a lock around your code.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB