Search - User list
Full Version: Possible to change Environment variable without closing?
Root » Houdini Lounge » Possible to change Environment variable without closing?
GlassworksEng
Hello,

I'm currently using this environment variable in my houdini.env

HOUDINI_OTLSCAN_PATH = C:/path/to/my/otls

But I would like to find a way to change it when opening a new scene file (i.e without closing Houdini) Is this possible?

Is there a command I can run to change it to:
HOUDINI_OTLSCAN_PATH = C:/new/path/to/my/new/otls
for example?

Thanks
Hans Palacios
Using Python in an open Houdini session, the function putenv() can set the env variable value, which can basically overwrite the existing one.

hou.putenv("HOUDINI_OTLSCAN_PATH", "C:/new/path/to/my/new/otls")

Reference: https://www.sidefx.com/docs/houdini/hom/hou/putenv.html [www.sidefx.com]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB