How to inspect existing global attributes?

   Views 568   Replies 3   Subscribers 1
User Avatar
Member
617 posts
Joined: Aug. 2014
Offline
Where can I inspect existing Graph (Global) attributes along with their values? Once a global attribute is created, it doesn't appear neither in Node Info dialog nor in Task Graph Table pane.
User Avatar
Staff
613 posts
Joined: May 2014
Offline
Global attributes are supposed to appear in the MMB window on the TOP Network manager itself, but it looks like that was broken with the introduction of the new MMB info window across all contexts in Houdini. Please log a bug for that.
Edited by tpetrick - Feb. 12, 2025 17:00:06
User Avatar
Member
617 posts
Joined: Aug. 2014
Offline
I'd also like to ask about the lifetime of a Graph (Global) variable. It seems that global variables persist even if nodes that created them are deleted from the graph.

For example, if I:
  1. Drop an Attribute Create TOP and create a string global variable named fooand set it to bar.
  2. Cook this node.
  3. Delete it.
  4. Drop another Attribute Create TOP, create a string attribute named dar(of any scope) and set its value to `@foo`.

Then even though there is nothing in the graph that creates the foo=barattribute, it will still be available and its value will be pulled from thin air. As a result, the value of darbecomes bar. This persists between hipfile reloads.

I can delete a global variable by temporarily creating an Attribute Delete TOP, piping it to anything and cooking it. Afterwards this node can be removed. This is very counterintuitive and extraordinary, which brings me to a question: is this behavior intentional? Why do global variables live on without the nodes that created them?
Edited by ajz3d - Feb. 12, 2025 17:11:22
User Avatar
Staff
613 posts
Joined: May 2014
Offline
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.
  • Quick Links