TaylorJamesIT
July 25, 2024 17:07:02
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
dtempcyer
July 25, 2024 18:21:20
tpetrick
July 26, 2024 10:50:24
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.