Alternative for $HOME in Packages ?

   1856   11   3
User Avatar
Member
767 posts
Joined: April 2014
Offline
I would like to know if I need to set the $HOME environment variable for use in packages.json; or is there another means I could use instead of placing an environment variables for the system ?
【T】【C】【S】
User Avatar
Staff
411 posts
Joined: Feb. 2018
Offline
You don't have to set $HOME to use packages, Houdini supports multiple directory locations [www.sidefx.com] for placing your package file
User Avatar
Member
767 posts
Joined: April 2014
Offline
What exactly must I set within a package file so that it will read a directory location as so that I can remove the $HOME environment variable as I can't make out which to use in the link you gave ?
【T】【C】【S】
User Avatar
Staff
411 posts
Joined: Feb. 2018
Offline
The simplest setup is to add your package file under $HOUDINI_USER_PREF_DIR/packages. If you want to redirect the package loading to a different location where Houdini could pickup a different package file, set the `package_path` keyword in your package file with the directory path containing the package file.
User Avatar
Member
767 posts
Joined: April 2014
Offline
mabelzile
The simplest setup is to add your package file under $HOUDINI_USER_PREF_DIR/packages. If you want to redirect the package loading to a different location where Houdini could pickup a different package file, set the `package_path` keyword in your package file with the directory path containing the package file.

You still need an environment variable; in this case $HOUDINI_USER_PREF_DIR.
【T】【C】【S】
User Avatar
Member
478 posts
Joined: Aug. 2014
Offline
$HOUDINI_USER_PREF_DIR is where your user preferences are. It defaults to $HOME/houdini19.5, if not explicitly set, so you don't need to create it.
Dive into that path, create and configure a new package [www.sidefx.com] in packagessubdirectory. With package's .jsonfile you can modify environment variables to your liking.
User Avatar
Member
767 posts
Joined: April 2014
Offline
$HOME I don't need to set; but $HOUDINI_USER_PREF_DIR as an environment variable still must be set. There could be something I'm not understanding, but Houdini will need to find the JSON file to read the packages file.

I doubt that no environment variable must be set; if I'm wrong, this is what I'm not understanding ?
【T】【C】【S】
User Avatar
Staff
411 posts
Joined: Feb. 2018
Offline
HOUDINI_USER_PREF_DIR should be set when Houdini is starting up. Can you post your Houdini information details (i.e. Help|About Houdini| Show Details) ?
User Avatar
Member
767 posts
Joined: April 2014
Offline
@mabelzile
I have a custom path for the variable HOUDINI_USER_PREF_DIR.
【T】【C】【S】
User Avatar
Staff
411 posts
Joined: Feb. 2018
Offline
Yu can set HOUDINI_PACKAGE_VERBOSE=1 before running Houdini to see if something is wrong when loading your packages.
User Avatar
Member
767 posts
Joined: April 2014
Offline
mabelzile
Yu can set HOUDINI_PACKAGE_VERBOSE=1 before running Houdini to see if something is wrong when loading your packages.

The Houdini package log is correctly reading a custom package file. What environment variable must be set if any; or just the HOUDINI_USER_PREF_DIR environment variable ?
【T】【C】【S】
User Avatar
Staff
411 posts
Joined: Feb. 2018
Offline
If you need to set HOUDINI_USER_PREF_DIR with a custom path, follow the directives in the documentation [www.sidefx.com]

HOUDINI_USER_PREF_DIR

The directory to store user preference files. The value of this variable must include the substring __HVER__, 
which will be replaced at run time with the current MAJOR.MINOR version string. On Windows and Linux, this 
defaults to the expanded value of $HOME/houdini__HVER__. On Mac OSX, it will also use this default if the 
directory exists, else it uses the expanded value of $HOME/Library/Preferences/houdini/__HVER__.
  • Quick Links