underscoreus Posted March 12, 2021 Share Posted March 12, 2021 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! Quote Link to comment Share on other sites More sharing options...
bunker Posted March 15, 2021 Share Posted March 15, 2021 https://www.sidefx.com/forum/topic/42767/?page=1#post-310589 1 Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted March 16, 2021 Share Posted March 16, 2021 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 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.