Hey guys,
I'd like to customize my env variables so $HIP and $JOB default to somewhere else, and I'd like to change the location of my preferences folder.
For example right now my preferences folder is CUsers/Adam/Documents/houdini11.0
I'd like it to be:
CUsers/Adam/Projects/houdini11.0
and then have $HIP and $JOB (Whats the difference?) default to CUsers/Adam/Projects/
Customize ENV variables, windows
5535 3 0- ahfx
- Member
- 15 posts
- Joined: Oct. 2010
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: Nov. 2008
- Offline
You can't assign $HIP to different path, because $HIP - is the path to your currently opened scene. $JOB - is another helpful var. that you can use to define your current project. In windows OS, you can setup $JOB, just by typing path in “Start In” field, in houdini shortcut. So you can have several houdini shortcuts for different projects. Any env. variables can be set in houdini.env (like in maya), you can also set it as “global” system variables in your OS. Another way to set it for one houdini session, is to use Python to set all variables and paths you need in $PATH variable , and then lunch houdini. You can see almost all houdini variables using hconfig utility in houdini/bin folder.
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
Sr. Graphics Tools Engineer @ Nvidia
- archie
- Member
- 71 posts
- Joined: June 2008
- Offline
Hi, ahfx
For preferences: you should set $HOME in CUsers/Adam/Projects
If you want to change $JOB, you will need to override the current work directory (cwd) before start Houdini and I think that Stalkerx777 has showed easy way for windows (tune shortcuts).
Usually people create simple script for start app (app. wrappers). You can write the python script, for example (just idea):
import os,subprocess
HOUDINI_INSTALL_PATH='CHoudini/'
HOUDINI_MAJOR_RELEASE='11'
HOUDINI_MINOR_RELEASE='0'
HOUDINI_BUILD_VERSION='581'
HOUDINI_BUILD='%s.%s.%s'%(
HOUDINI_MAJOR_RELEASE,
HOUDINI_MINOR_RELEASE,
HOUDINI_BUILD_VERSION)
HFS='%s%s'%(
HOUDINI_INSTALL_PATH,
HOUDINI_BUILD)
HOME = ‘Cprofiles/houdini’
HH='%s/houdini'%HFS
HB = ‘%s/bin’%HFS
os.environ=HFS
os.environ = HOME
os.environ=HH
os.environ= os.path.pathsep.join([HB,os.environ])
if __name__ == ‘__main__’:
‘'’ Set JOB ‘'’
os.chdir('C')
startpath =
subprocess.Popen(startpath)
P.S.
If you have got a lot of projects and you realy need flexibility in your work, you can use module ConfigParser of Python which works with config files. You can find some examples in Python documentation:
http://docs.python.org/library/configparser.html?highlight=configparser#ConfigParser.ConfigParser [docs.python.org]
For preferences: you should set $HOME in CUsers/Adam/Projects
If you want to change $JOB, you will need to override the current work directory (cwd) before start Houdini and I think that Stalkerx777 has showed easy way for windows (tune shortcuts).
Usually people create simple script for start app (app. wrappers). You can write the python script, for example (just idea):
import os,subprocess
HOUDINI_INSTALL_PATH='CHoudini/'
HOUDINI_MAJOR_RELEASE='11'
HOUDINI_MINOR_RELEASE='0'
HOUDINI_BUILD_VERSION='581'
HOUDINI_BUILD='%s.%s.%s'%(
HOUDINI_MAJOR_RELEASE,
HOUDINI_MINOR_RELEASE,
HOUDINI_BUILD_VERSION)
HFS='%s%s'%(
HOUDINI_INSTALL_PATH,
HOUDINI_BUILD)
HOME = ‘Cprofiles/houdini’
HH='%s/houdini'%HFS
HB = ‘%s/bin’%HFS
os.environ=HFS
os.environ = HOME
os.environ=HH
os.environ= os.path.pathsep.join([HB,os.environ])
if __name__ == ‘__main__’:
‘'’ Set JOB ‘'’
os.chdir('C')
startpath =
subprocess.Popen(startpath)
P.S.
If you have got a lot of projects and you realy need flexibility in your work, you can use module ConfigParser of Python which works with config files. You can find some examples in Python documentation:
http://docs.python.org/library/configparser.html?highlight=configparser#ConfigParser.ConfigParser [docs.python.org]
Alexey Mazurenko
- ahfx
- Member
- 15 posts
- Joined: Oct. 2010
- Offline
-
- Quick Links