Taylor Petrick

tpetrick

About Me

Connect

LOCATION
Canada
WEBSITE

Houdini Skills

Availability

Not Specified

My Badges

SideFX Staff
Since May 2014

My Tutorials

obj-image Intermediate
PDG Partitioner Nodes
obj-image Quick Tips
Work Item Attributes

Recent Forum Posts

File Pattern Fails in Headless Mode – 'Interrupted by User' May 19, 2025, 1:20 p.m.

Pressing the cook button on the TOP triggers a non-blocking cook, which mean the cook runs in the background. This is typically not suitable in a headless session because nothing will wait on the cook to finish, and it'll be canceled when it reaches the end of your script and Hython exits.

If you're triggering a cook programmatically in a script you should use one of the various hou.TopNode methods to do so, and pass in the block=True argument. That way your script actually waits for the cook to complete. For example: https://www.sidefx.com/docs/houdini/hom/hou/TopNode.html#cookOutputWorkItems [www.sidefx.com]

Creating Global Attribute through Python April 8, 2025, 10:20 a.m.

pdg.Graph has all of the same methods as pdg.WorkItem for adding/setting attributes. For example, in a Python Script. you can use the following to create a global string attribute named "example" that appears in the MMB menu on the TOP Network itself:

graph.setStringAttrib("example", "value")

How to inspect existing global attributes? Feb. 12, 2025, 5:21 p.m.

If you want the global attribute to be deleted when the work item that created it is deleted, then you should create the attribute using the Graph (Bound) type instead of the Graph (Global) type as described here: https://www.sidefx.com/docs/houdini/nodes/top/attributecreate.html#stringscope [www.sidefx.com]

Truly global attrbutes are saved as part of the graph if the Save Graph Attributes to .hip toggle is enabled on the network manager node. The purpose of unbound global attributes is provide a persistent place that work items can score key/value data, for example if you wanted to output file versions between multiple consecutive cooks of the same TOP network.