mabelzile
houdini.env is processed after the packages. You need to set these variables in your environment (e.g. shell terminal) before starting Houdini.
I create a hda&vex lib as a content only plugin for UE4. I was planning to use a generate a houdini.env file before HAPI_Initialize() and use this houdini.env file as parameter of HAPI_Initialize(). I thought I can set HOUDINI_PACKAGE_DIR in houdini.env. The package file will append HOUDINI_OTLSCAN_PATH, HOUDINI_VEX_PATH, HOUDINI_OCL_PATH.
As you have mentioned, however, it seems I can't do this because houdini.env is processed after the packages. So what should I do?
HAPI_Initialize( const HAPI_Session * session,
const HAPI_CookOptions * cook_options,
HAPI_Bool use_cooking_thread,
int cooking_thread_stack_size,
const char * houdini_environment_files,
const char * otl_search_path,
const char * dso_search_path,
const char * image_dso_search_path,
const char * audio_dso_search_path );
My package json file
{
"path": [
{
"value" : "$HOUDINI_PACKAGE_PATH/hda_module",
"method" : "append"
}
],
"env": [
{
"hdalib": "$HOUDINI_PACKAGE_PATH/hda_module"
},
{
"HOUDINI_OTLSCAN_PATH": {
"method": "append",
"value": [
"$hdalib/otls/Czx",
"$hdalib/otls/Lz",
"$hdalib/otls/Lyc",
"$hdalib/otls/Pb"
]
}
},
{
"PYTHONPATH": "$hdalib/python"
},
{
"HOUDINI_OCL_PATH": {
"method": "append",
"value": [
"$hdalib/ocl"
]
}
},
{
"HOUDINI_TOOLBAR_PATH":{
"method": "append",
"value": [
"$hdalib/toolbar"
]
}
}
]
}