How to use $HIP?
3755 6 1- iron100
- Member
- 20 posts
- Joined: July 2016
- Offline
- Emil
- Member
- 48 posts
- Joined: Sept. 2016
- Offline
- iron100
- Member
- 20 posts
- Joined: July 2016
- Offline
- jlait
- Staff
- 6201 posts
- Joined: July 2005
- Offline
You can't set $HIP. $HIP always refers to the directory your .hip file is found in. Thus, if you move the .hip file and all its dependencies around, it will still work. This works best if your .hip files are in the root of your project structure, so you have
myprojects/projectA/foo.hip
myprojects/projectA/geo/lotsof.bgeo.sc
Then $HIP/geo will work as expected. This sort of layout is what most of the default paths point to.
Alternatively, you may want a specific job home and have .hip be in a subfolder:
myprojects/projectA/hip/foo.hip
myprojects/projectA/geo/lotsof.bgeo.sc
Here you can set JOB to myprojects/projectA, and then use
$JOB/geo/lotsof.bgeo.sc
However you must be careful to reset JOB if moving the project.
myprojects/projectA/foo.hip
myprojects/projectA/geo/lotsof.bgeo.sc
Then $HIP/geo will work as expected. This sort of layout is what most of the default paths point to.
Alternatively, you may want a specific job home and have .hip be in a subfolder:
myprojects/projectA/hip/foo.hip
myprojects/projectA/geo/lotsof.bgeo.sc
Here you can set JOB to myprojects/projectA, and then use
$JOB/geo/lotsof.bgeo.sc
However you must be careful to reset JOB if moving the project.
- iron100
- Member
- 20 posts
- Joined: July 2016
- Offline
jlait
You can't set $HIP. $HIP always refers to the directory your .hip file is found in.
It does not work for me for some reason. Sometimes I need to move a project to a flash drive and all paths for textures are lost after that.
Is it impossible to set in the Aliases and Variables menu?
Can you advise step by step lessons how to use relative path in Houdini?
Edited by iron100 - Oct. 15, 2018 09:38:13
- jlait
- Staff
- 6201 posts
- Joined: July 2005
- Offline
It is impossible to set $HIP because that would defeat it being the path to the .hip file. If you load a .hip file from the correct path on the flash drive, it should on load set the $HIP to point to that correct path. I'm not sure why it isn't in your case.
So say you have a
if you copy all of this to your flash drive:
So say you have a
c:/path/to/my.hip
c:/path/to/texture/foo.jpg
Then in my.hip you have $HIP/texture/foo.jpgif you copy all of this to your flash drive:
f:/my.hip
f:/texture/foo.jpg
when you load my.hip from the flash drive it should set $HIP to f:/
, and then $HIP/texture will become f:/texture
, and you should find the path.
Edited by jlait - Oct. 15, 2018 10:16:13
- iron100
- Member
- 20 posts
- Joined: July 2016
- Offline
Looks like I did it. I set my own root folder as $JOB and $HIP link was created automatically.
But not for my geometry and texture files, and I had to write links for them manually.
Now everything works on a flash drive too. But is this correct or should this textures $HIP path be created automatically?
But not for my geometry and texture files, and I had to write links for them manually.
Now everything works on a flash drive too. But is this correct or should this textures $HIP path be created automatically?
-
- Quick Links