Jump to content

Environment Variables - Houdini


Recommended Posts

Hello all, 

So ive been customing the Houdini env variables within the Houdini docs folder. All working correctly with my job and hip file paths set as I wish. 

I was wondering is it possible to reference a system environment variable within the Houdini env variables script?

(So set a environment variable called HOME to a certain path in the systems env variables)

(Then call HOME within the Houdini env variables to set JOB or whatever). 

Any guidance or help appreciated as always :)

Thanks

C. 

 

 

 

Link to comment
Share on other sites

Generally speaking you should set system and other environment variables not related to Houdini in the shell, or to the system, before launching Houdini. You should not use Houdini.env for production use like that. I do not believe it will let you set non houdini environment variables. Plus there is no reading from the Houdini.env . Though that would be easy to test pretty quickly if something has changed.

Usually having a python like wrapper that injects all the variables into a shell prior to launching is the best. As you can use this same system on other DCC too. 

Also side note, If you are messing with $HOME you should try and use $HOUDINI_USER_PREF_DIR instead. There are some known programs that do try and use $HOME, which is why SESI made the $HOUDINI_USER_PREF_DIR so you don't break other stuff.

Hope that helps

 

  • Like 1
Link to comment
Share on other sites

On ‎30‎/‎05‎/‎2018 at 4:26 PM, LaidlawFX said:

Generally speaking you should set system and other environment variables not related to Houdini in the shell, or to the system, before launching Houdini. You should not use Houdini.env for production use like that. I do not believe it will let you set non houdini environment variables. Plus there is no reading from the Houdini.env . Though that would be easy to test pretty quickly if something has changed.

Usually having a python like wrapper that injects all the variables into a shell prior to launching is the best. As you can use this same system on other DCC too. 

Also side note, If you are messing with $HOME you should try and use $HOUDINI_USER_PREF_DIR instead. There are some known programs that do try and use $HOME, which is why SESI made the $HOUDINI_USER_PREF_DIR so you don't break other stuff.

Hope that helps

 

Thanks Ben really appreciate the advice and insight really helpful! 

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...