David Grzesik


About Me

VFX Artist
Not Specified


Recent Forum Posts

PDG doesn't cook full network after a Server Block Nov. 28, 2022, 11:09 a.m.

So I managed to find a work around for this behavior. Referencing this [www.sidefx.com] page on TOPs event handling, I put an event handler for when the "commandserverend" TOP completed cooking. This way immediately as that server block finishes, it will call to cook the output node at the bottom.
Here's the example snippet I placed in the OnCreated script on the HDA so the event is registered each time when the node is loaded in:
import pdg
top_node = kwargs['node'].node("./query_SG/commandserverend2")


pdg_context = top_node.getPDGGraphContext()

# Define our event handler
def cookRestOfNetwork(event):
pdg_context.addEventHandler(cookRestOfNetwork, pdg.EventType.CookComplete)

This had a strange behavior in an earlier test where I was using the ui display message example from the TOPs Events page where everything would work as expected, but if I had it also cook that output node it would endlessly pop up the display message....So I just took that ui stuff out because of course its not needed and it didn't endlessly loop.

I don't know exactly what is up with this, but this seems to be working for the time being.

Would love to not have to do this though and just be able to cook the full graph as usual lol

PDG doesn't cook full network after a Server Block Nov. 22, 2022, 4:07 p.m.

So I am using TOPs to query Shotgrid and return information about assets in this example. For some reason when cooking this network TOPs will only cook the Shotgrid server block and consider the graph done. If I then manually ask it to cook again, it will finish up the graph. This is a very strange behavior that I was hoping someone might have some insight into?

You can see that during the first cook the TOP net has the nodes below waiting for evaluation. But, as see in AfterCook1, these nodes are left uncompleted after the server block finishes cooking. When I force it to cook again, it quickly finishes up these nodes.

I am using the top level TOP net buttons to control the network and am using "Cook Output Node". Also the little warning on the server end block is simply an attribute incompatibility message.