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
605 2 1- TaylorJamesIT
- Member
- 1 posts
- Joined: 8月 2017
- Online
- alexwheezy
- Member
- 293 posts
- Joined: 1月 2013
- Online
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
- スタッフ
- 600 posts
- Joined: 5月 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