Jump to content

Environment Variables


bonjarry

Recommended Posts

Our pipeline relies on setting environment variables to move around and pass information to the software (houdini, maya, etc.) such as which show, shot, asset is being worked on.

Working with Maya and other software, the environment variables are passed no problem.  Something seems to have happened to my particular setup so that, while working in Houdini, the environment variables are lost.

They are correct in the terminal, but when printing them out in the Houdini Python shell, they are not set.  It works correctly on other user accounts.  Can anyone think of a setting or something somewhere that might cause this?

 

thanks!

Link to comment
Share on other sites

Houdini has a setenv command in the hscript language which can modify the environment.  When Python starts, it duplicates the environment in a snap-shot.  So, the Python shell doesn't necessarily have all the environment variables that are set in Houdini.

 

You can use the hou.getenv() function instead of the built-in Python environment access functions.

Link to comment
Share on other sites

Hey crunch, thanks for the reply.

 

Unfortunately, using hou.getenv() seems to show the same problem.

 

From the Houdini Docs, it says 

Houdini picks up the system’s environment variables (such as $HOME) as well as the environment variables of the shell from which it was started, on platforms that support those concepts.

 

 

Is there something that would cause this to not happen?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...