You can modify environment variables in Generic Generator TOP

You can modify environment variables in Generic Generator TOP
Why · How · Examples
2022-11-04

   

Why

I've found this tip quite helpful and I think it might not be well known. So I've decided to write a short post about it.

I use Generic Generator TOP all the time. It's really simple to run any program over files in a directory, batch process textures, and so on. It solves many of VFX pipeline needs that I've used to address with ad-hoc shell scripts in the past.

When a scheduler executes your command locally, it automatically inherits Houdini's environment variables. This is a good default behavior, because your child process has access to the same binaries, libraries, configuration etc. But sometimes I want to have a control about the child process' environment.

   

How

Thankfully Generic Generator has a support for it. Click on the gear icon on your node parameters window → Edit Parameter Interface...Node Properties → Search for HQueue/Task Environment and Local/Environment Variables, select them and press the white → button, which will add those parameters to the node.

Start with a node

Add parameters

Node with new parameters

You can see two new parameter tabs: HQueue, Local. If you don't use HQueue renderfarm then you won't need HQueue parameters.

   

Examples

One example is to unset Houdini-specific environment variables. I sometimes do it to speed up startup times of Mantra, when I know that my IFD files are simple and don't rely on any of pipeline tools.

Unsetting variables

In another case I've used this for integrating a compositing software into TOPs for running some jobs automatically. I configure what to do with environment variables.

Passing configuration

That's it :), you can read more about this on SideFX forum and in the docs.