Search - User list
Full Version: Using hou.node().cook(force=True) on TOP nodes
Root » PDG/TOPs » Using hou.node().cook(force=True) on TOP nodes
lzl
Hi everyone,

I am trying to cook a houdini node with python script, by getting a node “end_node” with hou.node(“../path/to/that/node”), and then use end_node.cook(force=True) to get it to cook. To test it, there is a file saving node before the end_node, so if it runs successfully, the script will save a file.

This works well with geo network. However, when I tried to implement this in TOP network, the python could get the end_node, print the name of that node, but it does not save a file. I am using a ROP Geometry Output node as the end_node.

Does hou.node().cook() work with TOP network? If it does, how should I organize the script?

Many thanks!
lzl
X_H_N
https://www.sidefx.com/forum/topic/68141/?page=1#post-289575 [www.sidefx.com]

Thank you so much! It solved the problem

———————-
For anyone looking at this thread in the future, here is what I did –

Initially when the code works in SOP, it was
node = hou.node(node_path)
node.cook(force=True)

Now for the TOP version, it is
node = hou.node(node_path)
node.cook(force=True)
node.executeGraph(False, True, False, False)

Basically the TOP graph needs to be cooked, so the PDG graph would exist and could be executed.
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