Jump to content
Sign in to follow this  
underscoreus

Store Houdini environment variables between sessions

Recommended Posts

Hey guys,

I'm trying to use the python command hou.putenv('x', 'y') to store a variable that I want to last between sessions. Like storing the version number, project name etc etc. However, when I run the command it seems to only keep the variable in memory for one session, and if the file is closed and opened again the variable is gone.

Is there a way to store variables in the Houdini file using python or hscript?

Thanks for the read!

Share this post


Link to post
Share on other sites
On 3/12/2021 at 2:40 PM, underscoreus said:

Is there a way to store variables in the Houdini file using python or hscript?

hou.hscript("set -g VAR=val")

Will save the variable in the hip file

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×