{ "enable": true, "load_package_once": true, "process_order" : 1, "env": [ { "SOME_VAR" : "20.5.410" }, { "HOUDINI_OTLSCAN_PATH" : [ { "houdini_version == '$SOME_VAR'" : "/some/path", "method" : "append" } ] }, ] }
Houdini package expressions not working
476 4 2- Robbert
- Member
- 55 posts
- Joined: 2月 2017
- Offline
I am trying to use expressions for dynamic include/excludes in my package files but it does not seem to work if I try to compare with any self-set environment variables inside of the package file. Doing include expressions like "houdini_version == '20.5.410'" work, but changing that to "houdini_version == '$VAR_HOUDINI_VERSION'" (where var = "20.5.410") seems to return false or break and skip the package. How are these supposed to be used and why does this not work?
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
- alexwheezy
- Member
- 318 posts
- Joined: 1月 2013
- Offline
- ObeidaZakzak
- Member
- 123 posts
- Joined: 12月 2019
- Offline
Robbert
it does not seem to work if I try to compare with any self-set environment variables inside of the package file
Self-set environment variables work well for setting a value, like :
{
"env": [
{
"MY_BROWSER_PATH" : "C:/Program Files/Google/Chrome/Application/chrome.exe"
},
{
"HOUDINI_EXTERNAL_HELP_BROWSER" : "$MY_BROWSER_PATH"
}
]
}
But they don't work for package expressions when set within the same package file, and have to be set prior to scanning this package file. You have to set
SOME_VAR
in a previously loaded package file or in system environment variables before starting Houdini (and called with $
prefix, without single quotes ''
) :{
"env": [
{
"MY_BROWSER_PATH" : "C:/Program Files/Google/Chrome/Application/chrome.exe"
},
{
"HOUDINI_EXTERNAL_HELP_BROWSER" :
{
"houdini_version == $SOME_VAR " :"$MY_BROWSER_PATH"
}
}
]
}
alexwheezy
I think this is because a number is expected, not a string.
The expression syntaxe actually expects string values.
Edited by ObeidaZakzak - 2024年12月5日 10:04:45
Houdini Pipeline Supervisor @ TAT Studio
- alexwheezy
- Member
- 318 posts
- Joined: 1月 2013
- Offline
- Robbert
- Member
- 55 posts
- Joined: 2月 2017
- Offline
-
- Quick Links