HFS, HSITE, HOUDINI_USER_PREF_DIR & HOUDINI_PATH relationships

   7447   4   1
User Avatar
Member
316 posts
Joined:
Offline
I know, it looks like I'm shouting in the title…

Are there any suggestions on “best practices” when managing these variables? I find it confusing how Houdini resolves version info in a different way for each one… HOUDINI_USER_PREF_DIR must have a __HVER__ string, and HSITE resolves the version implicitely.

However, the HOUDINI_PATH variable seems to override both, which means I have to include them in HOUDINI_PATH… yet, how do I include them? It seems if I single-quote them within HOUDINI_PATH as they are, ‘hconfig -ap’ will show me that HOUDINI_USER_PREF_DIR is getting resolved correctly but HSITE is not. HFS is correctly resolved.

If set HOUDINI_PATH, should I unset HOUDINI_USER_PREF_DIR and HSITE?

Cheers,
Jon
User Avatar
Member
316 posts
Joined:
Offline
Here is an example of a setup that seems to work for me:

HOUDINI_USER_PREF_DIR=$PROJECT_PATH/crew/$USER/houdini__HVER__
HSITE=$PROJECT_PATH/tools/pkg/houdini

HOUDINI_PATH=.:$PROJECT_PATH/crew/$USER/houdini$HOUDINI_MAJOR_RELEASE.$HOUDINI_MINOR_RELEASE:$HSITE/houdini$HOUDINI_MAJOR_RELEASE.$HOUDINI_MINOR_RELEASE'$HSITE':$HFS/houdini

Note the single quotes around $HSITE…

HOUDINI_PATH when expanded is equal to: <HIP>:<HOUDINI_USER_PREF_DIR>:<HSITE>/houdini<houdini_version>:<HSITE>:<HFS>/houdini

Simply referencing those variables in HOUDINI_PATH doesn't seem to work, but this does. Running hconfig -ap seems to confirm it:
Directories searched (in order) are:
1) “.”
2) “$HOUDINI_USER_PREF_DIR”
3) “$HSITE/houdini15.5”
4) “$HSITE”
5) “$HFS/houdini”
Edited by jparker - June 22, 2016 11:36:59
User Avatar
Member
316 posts
Joined:
Offline
This is becoming more of a journal for myself, I guess.

It seems that this setup does NOT pick up any vex .h files in the standard HOUDINI_PATH…
User Avatar
Member
7899 posts
Joined: July 2005
Offline
I'm not sure why you need to set HOUDINI_PATH? If you need to, then use “&” (as documented in the hconfig -ap output) to use include the default HOUDINI_PATH. That way, you're only adding to it, not replacing.
User Avatar
Member
316 posts
Joined:
Offline
Thanks Edward…

My last problem was actually caused by a Python script inadvertently setting Houdini environment variables… second message holds, everything seems to work.

Setting HOUDINI_PATH is necessary when including 3rd party Houdini tools such as Arnold, no?

I have other collections of OTLs, VEX libs and scripts which are grouped together and are not needed for every project… I assume that adding or removing the root path to those tools to HOUDINI_PATH would be the best way to optionally include them.

-Jon
  • Quick Links