Hello,
Can someone tell me how I might be able to query the values of environment variables pre cook ? We have a bunch of tokenized paths for events like caching and rendering. We want to check that the values in those tokes are valid prior to executing a cook.
Thanks
Mike
Pre Cook Sanity Check
690 2 1- TaylorJamesIT
- Member
- 1 posts
- Joined: Aug. 2017
- Offline
- alexwheezy
- Member
- 318 posts
- Joined: Jan. 2013
- Offline
Take a look at this example.
https://www.sidefx.com/docs/houdini/examples/nodes/top/environmentedit/EnvironmentEdit.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/examples/nodes/top/environmentedit/EnvironmentEdit.html [www.sidefx.com]
- tpetrick
- Staff
- 600 posts
- Joined: May 2014
- Offline
You can register a custom function that gets invoked each time a graph is cooked, and can return True/False to allow/reject the cook to continue based on the state of the graph: https://www.sidefx.com/docs/houdini/tops/pdg/TypeRegistry.html#registerPreflightHandler [www.sidefx.com]
The documentation for that function includes a reference to a page that describes how to write and install custom handlers. Typically they're placed in the PDG search path and loaded when Houdini starts.
The documentation for that function includes a reference to a page that describes how to write and install custom handlers. Typically they're placed in the PDG search path and loaded when Houdini starts.
-
- Quick Links