Travis Saul
plobnop
About Me
専門知識
Technical Director
業界:
Gamedev
Connect
LOCATION
United States
ウェブサイト
Houdini Engine
Availability
Not Specified
Recent Forum Posts
Houdini Packages, Subprocess, and duplicate env vars 2022年8月22日7:02
Thanks for the link tamte. I've been using the info on that page for all along. I'm beginning to wonder if this is a bug. If I remove the houdini_os expression I no longer get a duplication of my env var values. Either this is a bug or I'm still not getting the syntax correct in my package.
WORKS (does not duplicate var value):
os.environ result:
Does NOT work (duplicates var value):
os.environ result:
WORKS (does not duplicate var value):
{ "enable": true, "load_package_once": true, "env": [ { "var": "MYENVVAR1", "value": "C:/Users/me/some/path", "method": "replace" }, { "var": "MYENVVAR2", "value": "C:/Users/me/some/other/path", "method": "replace" } ] }
MYENVVAR1:C:/Users/me/some/path MYENVVAR2:C:/Users/me/some/other/path
{ "enable": true, "load_package_once": true, "env": [ { "var": "MYENVVAR1", "value": [ { "houdini_os == 'windows'": "C:/Users/me/some/path", "method": "replace" }, ] }, { "var": "MYENVVAR2", "value": [ { "houdini_os == 'windows'": "C:/Users/me/some/other/path", "method": "replace" }, ] } ] }
MYENVVAR1:C:/Users/me/some/path;C:/Users/me/some/path MYENVVAR2:C:/Users/me/some/other/path;C:/Users/me/some/other/path
Houdini Packages, Subprocess, and duplicate env vars 2022年8月21日16:39
It's strange. I've tried setting both of these in my package and I'm still getting a double loading of the environment variables.
Houdini Packages, Subprocess, and duplicate env vars 2022年8月21日14:32
I have an issue and I'm curious if any of you have any solutions. I've set some environment variables via a package located in a custom directory set via HOUDINI_PACAGE_DIR. When I run Houdini the variable load find and there are no issues. However, for purposes of publishing on a pipeline, I am using subprocess within a python script to copy, open, and execute some rops within a hip files. The strange thing is, the values of the env vars I've set within that package are doubled or a copy of that values is appended. MYENV1 would normally have a values of "C:/Users/me/some/path". When accessed from within a Houdini hip file opened via subprocess it has a value of "C:/Users/me/some/path;C:/Users/me/some/path". Additionally, this behavior does not happen if I set the environment variables via houdini.env.
I'm not sure how to prevent this from happening. Any thoughts?
Here's the simple package json I was using:
I'm not sure how to prevent this from happening. Any thoughts?
Here's the simple package json I was using:
{ "enable": false, "env": [ { "MYENV1": [ { "houdini_os == 'windows'": "C:/Users/me/some/path" }, { "houdini_os == 'macos'": "/Users/me/some/path" } ] }, { "MYENV2": [ { "houdini_os == 'windows'": "C:/Users/me/some/other/path" }, { "houdini_os == 'macos'": "/Users/me/some/other/path" } ] } ] }