davidyannick Posted August 6, 2019 Share Posted August 6, 2019 Is there a way to change $HOME location to a specific folder ? Thanks Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted August 7, 2019 Share Posted August 7, 2019 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 Quote Link to comment Share on other sites More sharing options...
davidyannick Posted August 7, 2019 Author Share Posted August 7, 2019 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 job Quote Link to comment Share on other sites More sharing options...
davidyannick Posted August 7, 2019 Author Share Posted August 7, 2019 by the way the issue is houdini.env ignore the changes, and houdini always pointing to default folder ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted August 7, 2019 Share Posted August 7, 2019 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) 1 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted March 19, 2020 Share Posted March 19, 2020 (edited) . Edited March 19, 2020 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted March 19, 2020 Share Posted March 19, 2020 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 ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted March 19, 2020 Share Posted March 19, 2020 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. Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted March 20, 2020 Share Posted March 20, 2020 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 ? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted April 1, 2020 Share Posted April 1, 2020 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.