How to use $HIP?

   3741   6   1
User Avatar
Member
20 posts
Joined: July 2016
Offline
How to use $HIP for relative path of my project files?
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
First use Set Project, then use $JOB instead of $HIP when you bring any file (textures so on).
User Avatar
Member
20 posts
Joined: July 2016
Offline
Emil
First use Set Project, then use $JOB instead of $HIP when you bring any file (textures so on).

I select my custom folder, press “Accept” and it set $JOB. And how to set $HIP?
User Avatar
Staff
6179 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.
User Avatar
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
User Avatar
Staff
6179 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
c:/path/to/my.hip c:/path/to/texture/foo.jpgThen in my.hip you have $HIP/texture/foo.jpg

if you copy all of this to your flash drive:
f:/my.hip f:/texture/foo.jpgwhen 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
User Avatar
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?
  • Quick Links