Conditional statement in houdini.env

   1170   1   0
User Avatar
Member
13 posts
Joined: May 2014
Offline
Is it possible to switch the value of environment variable with something like if-statement?
I am now syncing houdini.env over multiple PCs including Windows and macOS, and wondering the way to load additional plugins depend on the value of HOUDINI_OS.

Though I tried to write some scripts in $HOUDINI_PATH/scripts/pythonrc.py, it would not work as the process to load plugins seems to be done before pythonrc.py is executed.



if hou.getenv("HOUDINI_ENV") is "Windows:
    hou.putenv("HOUDINI_OTLSCAN_PATH", "%s;<THE PATH TO PLUGINS>" % hou.getenv("HOUDINI_OTLSCAN_PATH"))
Edited by baku89 - July 10, 2019 00:43:00
User Avatar
Member
13 posts
Joined: May 2014
Offline
Houdini packages would be useful than traditional houdini.env.

{
“path” :
[
{“houdini_os != ‘windows’” : “/user/bob/libs”},
{“houdini_os == ‘windows’” : “$HOME/bob_win_libs”},
{“$use_tom_libs == ‘1’” : “$HOME/tom_libs”}
]
}

https://www.sidefx.com/docs/houdini/ref/plugins.html [www.sidefx.com]
  • Quick Links