Problems with $JOB variables

   2794   4   2
User Avatar
Member
336 posts
Joined: Dec. 2014
Offline
Ok this one is new and I'm not sure why I haven't run into this before. I'm able to set my $JOB variable for the current session of Houdini only, it always defaults back to the location it was launched from next time I open my hip file, so all my file dependencies break.

I noticed if I open the hip file in a text editor there's a set -l JOB and a set -g JOB. The local JOB variable is correct, the -g one sees to be causing problems. Also, I'm not able to edit (change) the JOB path in the Aliases and Variables dialogue. Any clues on what's going on here? Thanks!
User Avatar
Member
267 posts
Joined: March 2011
Offline
AndyW
Ok this one is new and I'm not sure why I haven't run into this before. I'm able to set my $JOB variable for the current session of Houdini only, it always defaults back to the location it was launched from next time I open my hip file, so all my file dependencies break.

I noticed if I open the hip file in a text editor there's a set -l JOB and a set -g JOB. The local JOB variable is correct, the -g one sees to be causing problems. Also, I'm not able to edit (change) the JOB path in the Aliases and Variables dialogue. Any clues on what's going on here? Thanks!

I´m having the same problem and my file has the “SET -g JOB” overriding the variable.
Have you found a solution?
User Avatar
Member
267 posts
Joined: March 2011
Offline
I´ve found a solution, but still don´t know what has caused the problem.

In the python shell u must set JOB in the environment before opening the hipfile, using:

import os
os.environ = “path/to/project/folder”

and then
hou.allowEnvironmentToOverwriteVariable(“JOB”,True)

And then you open the hip file.
User Avatar
Staff
1449 posts
Joined: July 2005
Offline
There was a bug 106528 that caused problems when there is both `set -l JOB` and a `set -g JOB` in a .hip file. This could happen when JOB was set without `-g` option, leading two to variables: one local and one global. The issue is fixed in 18.5.450 and 18.0.695, where JOB is always forced to be global, even with `-l` option, to make it consistent with other "global" variables such as HIP, HIPNAME, etc.
User Avatar
Member
41 posts
Joined: Dec. 2019
Offline
It's not working for me JOB replace global,I have two PC one for modeling,When I render To Another machine,must I change JOB to full path using command opchange in tab Textport window $JOB to /media/4545HGHKD5GD/Projects/HoudiniProjects.
  • Quick Links