Reference: Search and reconnect reference files


This command will search and fix reference file paths of an active scene.

I experienced that often times I receive those maya files with reference files which have local absolute file path. I hope this little scripts will save your time as well. :)

Command:
import i3d,i3d_utility as iU;iU.referenceInfo().reloadReferenceFiles(-1,"refFolder");
# change "refFolder" to your folder name.


Prerequisites:
Download i3d pyc files.
https://ironthreed.blogspot.com/2019/02/i3d-2019-version-i3d-python-script-files.html
A license file.
Download and move it to "/User/maya/scripts/i3d/" folder.
i3d_lic.pyc

Example:
1. This is your current active scene.

2. All reference files are stored in "references" folder under current active scene project.

3. When opening a file, check "Remember these settings" and press skip button.

4. Execute the command(python)
import i3d,i3d_utility as iU;iU.referenceInfo().reloadReferenceFiles(-1,"refFolder");
# INPUT ARGUMENTS: int, string
#      int: directory level from current active scene.
#            e.g. -2 will be C:\Users\i3d\Documents\maya\
#      string: folder name(where reference files are stored)
#            e.g. -2 and "refFolder" will be C:\Users\i3d\Documents\maya\refFolder\

Comments

Popular posts from this blog

HIK: Getting current character and current source.