Nuke-Python Path Fix

I finished my first ever nuke-python script. It was a blast to learn and I hope to do more in the future. I used the Python lessons on The Foundry’s website as a starting point, but wrote this script from scratch using a fairly different (simpler) technique.

Run this script to update all the Read node file paths in your script at once. This is ideal for situations like switching between operating systems or from a portable device to your hard drive. The script relies on the fact that all your files are contained within a project folder. It will update Read and ReadGeo nodes. It will only update nodes that are broken.* And it works on file paths that include subfolders.**

Download: fixPaths.py

Run script. In the window that opens, navigate to the new location of the project folder. Select the folder or a file in the folder, click okay. Done!

*this particular feature only works if your computer permissions allow the os.stat() functions.
**will not account for files that move within the project folder. it only updates the new location of the entire project folder.

Leave a Reply