Q: HOM: Equivalent of RMB "Cook selected Node"?

   1316   1   2
User Avatar
Member
7024 posts
Joined: 7月 2005
Offline
Hi,

I'm attempting to use HOM to replicate the behaviour of the RMB Cook Selected Node menu item on a TOP.

How does node.executeGraph() know to cook only the current node? The help says:

“Generates and then cooks the PDG graph owned by the parent network of this node”

however it does not actually cook the entire graph of the parent network! It only cooks the current node.

Which is cool, and does what I want.

So just so I understand, executeGraph() actually does not execute the whole graph, just the node specified (and obviously its inputs).

If I want the equivalent of “Cook Output Node” I would find the node using topnode.outputNode() then use executeGraph() on that?

If so that is fine, and I was confused by the docs

18.5.351 Py 3 Win 10

Cheers,

Peter B
User Avatar
Member
603 posts
Joined: 9月 2016
Offline
Yes, that's right. The PDG node(s) for the TOP node you RMB on are passed to the graph context cook function. The pdg API has the lower level `pdg.GraphContext.cook` to do the same.
  • Quick Links