Moved geometry file locations: How to redirect path ?

   5642   8   3
User Avatar
Member
43 posts
Joined: Aug. 2012
Offline
I'm here at school and we completely changed our servers and systems we work on, so now all my paths in houdini for my geometry is looking in the wrong Path location. Is there some python script or automatic way that houdini can find all my geometry based off of where one is? Adobe Premier has this feature and does it automatically.

The geometry file location is wrong and the node is red because it cannot find it. I really don't want to have to reattach all the geometry for this and all my other houdini files. Any help?

Thanks

Attachments:
grapes.png (63.3 KB)

http://vimeo.com/garretthoyos/demoreel [vimeo.com]

http://animation.byu.edu/ [animation.byu.edu]
User Avatar
Member
1 posts
Joined: Aug. 2009
Offline
http://www.sidefx.com/docs/houdini12.1/commands/opchange [sidefx.com]

This should help
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
This is why you should use $JOB and $HIP for all your geo files.
Drive, monkey, drive!
User Avatar
Member
319 posts
Joined:
Offline
Do you have an example of a current filepath and what the file path should be?

Are the current file paths created by referencing anything in your scenes like $OS etc?
User Avatar
Member
43 posts
Joined: Aug. 2012
Offline
It was dumb of me to not use $hip or $job. Unfortunately at the time I didn't think of this solution. It is currently looking in

$HOME/Desktop/grape_geo/v1.obj I wish it were looking at $HIP instead so I wouldn't have to worry about this if something ever gets moved again, but a Python script idea would be helpful, all my files are this way. :?
http://vimeo.com/garretthoyos/demoreel [vimeo.com]

http://animation.byu.edu/ [animation.byu.edu]
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
in a textport
/obj/ -> opchange ‘$HOME’/desktop ‘$HIP’

be very careful with opchange, it's very powerful…
and use single quotes -> ' <- around any variables
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
319 posts
Joined:
Offline
It seems from the example path you gave and from the screen grab that the name of your geometry file matches the name of the node which is filing it in.

In this case a quick way to do it would be just to box select all of them and re-type the path in as:-

$HIP/Desktop/grape_geo/$OS.obj

or

<whatever the new path of where your geo is kept is>/$OS.obj

If you really want to use a python script to do it, one way might be something like:-

sel = hou.selectedNodes()
for i in sel:
print i
i.parm(“file”).set(“$HIP/Desktop/grape_geo/$OS.obj”)

Provided you are using normal file sops to file in the geo, and you select the file nodes you want to change the filepath of before running the script (you don't have to do it this way, you could do it by searching for any file nodes in your scene for example).
User Avatar
Member
43 posts
Joined: Aug. 2012
Offline
thanks so much, you are gentlemen and scholars.

Garrett
BYU Animation, Utah
http://vimeo.com/garretthoyos/demoreel [vimeo.com]

http://animation.byu.edu/ [animation.byu.edu]
User Avatar
Member
319 posts
Joined:
Offline
Oh I forgot to mention, in case you didn't know, $OS simply returns the name of the node!
  • Quick Links