Search - User list
Full Version: Using python scripts to trigger pdg cooking doesn't seem to update parameters
Root » PDG/TOPs » Using python scripts to trigger pdg cooking doesn't seem to update parameters
coleclough
Hello there. I have seen a post similar to this however there hasn't been a response for a while.

I have made a topnet inside of my HDA that cooks textures. Parameters from the topnet are promoted to the HDA interface however cooking from the HDA interface (using hou.TopNode.executeGraph(1,0,0,0)) doesn't update the parameters on the top nodes, leading the graph to always cook with the same parameters as your first cook that session, unless you shift+v the bottom node in the pdg graph which is far from ideal in a digital asset.

Forgive me if I am missing an obvious function. I have tried cooking using hou.TopNode, pdg.GraphContext and pdg.Node, all of which yield the same results. I have also tried hou.TopNode.dirtyTasks/AllTasks(0/1) and pdg.Node.dirty(0/1)

This is a big issue as it really hinders the usability of my HDA, hopefully it is a trivial issue.

Thanks for your time.
tpetrick
What sort of nodes are in your TOP network? If you're using an HDA Processor or ROP Geometry, do you have caching enabled on those nodes? If you do, and their output files exist on disk, they'll be picking up the existing files rather than recooking from scratch every time.

Can you share the Python script you're using to re-cook the network? Doing a shift-v on a TOP node is the same as calling the following, where top_node is the selected node:

top_node.dirtyTasks(False) # True/False indicates whether output files on dirtied items should be deleted
top_node.executeGraph(True)

If you have a reference to the TOP Network itself, you can use network.displayNode() to get the TOP node in the network with the output flag.

I don't have Houdini in front me of now, but I can try to reproduce the problem next week. If you're able to send an example HDA that demonstrates the issue, that would be helpful.
coleclough
tpetrick
Hi there, turns out it was me not knowing how pdg operates. I had a look at your post in the other thread and figured that it was due to me not saving the hip before I cooked it.

Thanks for the swift reply.
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