Custom .env file at command line launch?

   2137   2   2
User Avatar
Member
101 posts
Joined: May 2006
Offline
Hi all!

Does anyone know how/if you would fire up Houdini from the command line to point to a custom houdini.env file of your own choosing rather than the one in the default path on the current system. I am assuming/hoping that it is just a flag on the end of the command.

Note this is for a windows environment.

Many thanks guys and gals,
Rich.
Edited by Richard Costin - July 10, 2019 05:08:36
User Avatar
Member
258 posts
Joined: July 2006
Offline
Richard Costin
Hi all!

Does anyone know how/if you would fire up Houdini from the command line to point to a custom houdini.env file of your own choosing rather than the one in the default path on the current system. I am assuming/hoping that it is just a flag on the end of the command.

Note this is for a windows environment.

Many thanks guys and gals,
Rich.
I could us that as well. anyone
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
User Avatar
Member
359 posts
Joined: April 2017
Offline
There isn't a command that just lets you pick an .env file, but there's a couple other things you could do.

Rez is a command-line-driven package management tool that's pretty popular. You can set up dependency chains to export different environment keys situationally. Source is here: https://github.com/nerdvegas/rez [github.com]

The other thing you could do is have a bash script / batch file set a couple of keys that your Houdini packages know to look for. If you're using the package system, you can have the keys you set (or packages you load) dependent on conditional expressions; so for example, you could have your bash script set key “customShow” to 1, and then your packages would only load the “customPlugin” package or set “customKey” to some special value if “customShow” is 1.

Basically just dynamically assemble all the environment keys you want to export (or “set” in Windows terms) in a batch file or with packages rather than setting them in Houdini.env. As long as Houdini is launched as a child process of the configured shell, it'll inherit any environment variables you set, including Houdini-specific ones.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
  • Quick Links