Understanding TopNode.cookOutputWorkItems()

   1218   2   1
User Avatar
Member
73 posts
Joined:
Offline
Hi,

Here's the documentation on the topic : https://www.sidefx.com/docs/houdini/hom/hou/TopNode.html#coo [www.sidefx.com]
My question is what does the tops_only=True argument for cookOutputWorkItems() mean and what is the significance?

From documentation:
tops_only

If True, TOP nodes will be cooked and schedulers will be initialized. This will create the underlying PDG Nodes and PDG Schedulers. No PDG cooking will occur, and no work items will be generated.

What is PDG cooking? If I run it with True of False, both seem to cook the graph, only when False it blocks the UI. Is that it's purpose?

Thanks for any insight!
User Avatar
Staff
600 posts
Joined: May 2014
Offline
If top_only is True then PDG does not cook at a all. Only the TOP nodes cooks -- this generates the underlying PDG nodes that corresponds to the TOP nodes, but does not create any work items.

The main use is so that you can call top_node.getPDGNode() on a TOP node that has not yet cooked, without actually creating any work items. If you put down a new TOP and call that method you'll notice it returns nothing -- that's because the TOP node hasn't cooked, and therefore has no underlying PDG node yet. Triggering a cook with top_only on that graph will ensure that all TOP nodes have a PDG node.
Edited by tpetrick - Feb. 22, 2023 11:00:47
User Avatar
Member
73 posts
Joined:
Offline
I understand now, thanks for that!
  • Quick Links