Hi,
I'd like to be able to set houdini variable, that would stick/save with current hipfile, using python.
When setting a new Houdini variable, manually (edit –> Aliases and Variables –> Variables), it seems that newly created variable will follow with current hipfile (save and reopen hipfile, variable still exists).
ex: RENDER –> /drive/myRenderXXX/path
When setting a new variable, or updating an exting one, using the python API, it seems to work well in current houdini session, but doesn't save with the scene.
ex: hou.putenv('RENDER', ‘/drive/myRenderYYY/path’)
*Now ‘RENDER’ variable has ben updated/set to ‘/drive/myRenderYYY/path’ when querying using: hou.getenv('RENDER').
However, changes is not set when looking at (edit –> Aliases and Variables –> Variables) nd is not saved when saving hipfile.
Is it possible to mimic (edit –> Aliases and Variables –> Variables) behavior, using python commands?
thanks,
Jonathan
Custom environment variable in Houidni
2202 1 0- jonathan.pgagne
- Member
- 33 posts
- Joined: May 2015
- Offline
- Akelian
- Member
- 34 posts
- Joined: July 2015
- Offline
One possible way is with the Environment qL from Qlab which if I remember right do what you want.
https://github.com/qLab/qLib/wiki/Assets#environment-ql-obj [github.com]
https://github.com/qLab/qLib/wiki/Assets#environment-ql-obj [github.com]
-
- Quick Links