Jump to content
davidyannick

changing $Home location

Recommended Posts

Don't change $HOME set the variable 

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__

 

https://www.sidefx.com/docs/houdini/ref/env.html

Share this post


Link to post
Share on other sites
15 minutes ago, LaidlawFX said:

Don't change $HOME set the variable 

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__

 

https://www.sidefx.com/docs/houdini/ref/env.html

ok but my purpose is to make my folder projets/17.5 the default folder for project and settinig HOUDINI_USER_PREF_DIR doest not the job5d4ad9f52194a_Capturedecran2019-08-07a16_01_56.thumb.png.48b3a82c8cd4fdc8c5fba298dca8a3da.png

Share this post


Link to post
Share on other sites

Houdini.env only allows you to change your personal preferences. There is an order of operations with environment variables. houdini.env is in $HOME which is equal to $HOUDINI_USER_PREF_DIR. So you can't use houdini.env to set those. You need to set those in the operating system environment or the shell before launching Houdini. Also the main reason not to set $HOME is that other programs will use $HOME, so if you change the default system variable for $HOME you may be accidentally screwing up those other programs. Where as $HOUDINI_USER_PREF_DIR is unique to Houdini.

I think what you really want to be using is $HOUDINI_PATH and $HSITE, the respective two main environment variables of Houdini. You can set these in houdini.env, but you should really be setting these variables before houdini.env is called as that is your personal preference directory. $HOUDINI_PATH allows you to have a string of different project paths, so you can have  $StudioTools;$ProjectTools;$MOPS;$QLIB;$REDSHIFT;& with the & representing the Houdini's install directory $HFS and $HOUDINI_USER_PREF_DIR. $HSITE allows you to have version specific tools like compiled library or version specific handling like $HIPNAME, the path is set up such as $HSITE = "p:/studio/tools/" and inside are folders for 17.5, 17.0, 16.5... 

HOUDINI_PATH

The path of directories where Houdini looks for configuration files.

HSITE

The HSITE variable is a path to the site-specific Houdini configuration information. This allows a site to have a common set of defaults and files. It is, by default, in the HOUDINI_PATH between HOME and HFS. To change global configuration information, you should use this rather than editing the contents of $HFS/houdini.

Like HOME, Houdini uses $HSITE/houdiniVERSION, where version is the current version number (ie: $HSITE/houdini16or $HSITE/houdini16.1)

  • Thanks 1

Share this post


Link to post
Share on other sites
On 8/7/2019 at 11:19 AM, LaidlawFX said:

$HOUDINI_PATH allows you to have a string of different project paths, so you can have  $StudioTools;$ProjectTools;$MOPS;$QLIB;$REDSHIFT;& with the & representing the Houdini's install directory $HFS and $HOUDINI_USER_PREF_DIR. $HSITE allows you to have version specific tools like compiled library or version specific handling like $HIPNAME, the path is set up such as $HSITE = "p:/studio/tools/" and inside are folders for 17.5, 17.0, 16.5... 

You can use global variables inside environment variables ? How are you setting those variables ?

Share this post


Link to post
Share on other sites

You just need to set them before, the Houdini ones are declared. Setting them in a shell prior to launching. Setting them in the global environment variables, they will all condense when anyone is called. You can even do it in Houdini.env if you set them prior to $HOUDINI_PATH.

Share this post


Link to post
Share on other sites

When you say; setting them in the global environment variables, do you mean inside; Edit > Aliases and Variables, or simply in a shell ? 

What do you mean, they will all condense when anyone is called ? I create the global variables, lets say $ACME; I use that inside of the HOUDINI_PATH environment variable and it's expanded when the Houdini.env ?

Share this post


Link to post
Share on other sites

For instance in your Houdini.env

# Houdini Environment Settings
#
ACME = P:/path/on/disk
HOUDINI_PATH = $HOUDINI_PATH;$ACME;&

ACME will be evaluated first and then when HOUDINI_PATH is evaluated it can use it in the path. Of course Houdini.env is for your personal preferences. 

So say you use windows environment, do Windows Key + Edit the system Environment Variables, in the System Properties press the button Environment Variables...

Here you can enter in local or system variables. Path on Windows is very common for say adding access to the command line for .exe say python, or Houdini's bin directory. If you put $HOUDINI_PATH here it will be processed first in the system. Thus having the inclusion of $HOUDINI_PATH; in my Houdini.env declaration of HOUDINI_PATH. Alternatively in this context any variable will be expanded prior to anyone of them being called. So unlike in Houdini.env or a python or bash script. You do't have to worry about order of operations.

One of the more common ways to set HOUDINI_PATH in production is via wrapper made by python, or a bashrc in linux. If you declare ACME then HOUDINI_PATH in it, and then launch Houdini or say Houdini Engine, any variables will be called first before Houdini.env. This happens with a parent child relationship where each application that spawn another application will inherent the parents "environment" variables. 

There are many other ways to set up the environment variables, but this should give some of the more common methods with order of operations concept. 

Hope that helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×