Changing large number of file paths

   3271   2   2
User Avatar
Member
143 posts
Joined: 9月 2017
オフライン
Hi,

after returning to my office from home office, I ran into a filepath issue while trying trying to continue on projects I started from home.
I have a slightly different drive arrangement and folder structure at home and some of the linked assets inside the scene come from outside the $HIP folder, others, probably mostly due to my incompetence use absolute filepaths even inside the $HIP folder, so the File and Texture nodes aren't finding the files they're supposed to.
Is it possible to change the filepaths all in one place instead of having to go inside of every Geo Node and MatNet?
Pre-flight seemed like the logical place to start looking, but I was unable to find a way to overwrite the locations of individual linked files, that had incorrect file-paths.

Any tip on how to do this in an intelligent manner, or how to avoid such troubles in the future (apart from a standardized drive-naming scheme and folder structure) would be much appreciated.

Cheers,
Ivan
User Avatar
Member
738 posts
Joined: 12月 2006
オフライン
You can try opfind and opchange:
opchange /my/stinky/old/path /my/shiny/new/path

You can use opfind first to see what it finds before you do the opchange.
opfind /my/stinky/old/path

If there is an env var, you have to protect it:
opchange \$MYSTINKYOLDVAR/geo \$MYNEWVAR/geo

This is also explained briefly in this tutorial [www.sidefx.com].
Edited by mrCatfish - 2020年5月15日 10:39:23
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
117 posts
Joined: 11月 2011
オフライン
Thanks mrCatfish- this helped me fix a texture filepaths issue.
Brad Schreiber
  • Quick Links