Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle, interactive iPad edition and DRM-free EPUB/PDF editions. Work faster, cry less. Read more about the ebook.




Follow cgbeige on Twitter

Topics by tag:



Recently published articles by Dave G:



Free downloads by Dave G:



Mac OS X-only downloads:

Spotlight Relinker: A MEL Script That Uses OS X’s Search Capabilities to Relink Missing Files

A lot of people wonder why I use a Mac to do 3D. There are more 3D apps for Windows, Linux has faster OpenGL speeds than both other the OSes that Maya runs on and the hardware choices are more limited. Well, this script sums up a lot of why I use it: incredible scriptability and a bridge between GUI tools like Spotlight search and the command line. If you read my article Creating the Ultimate Creative User OS, then you know what I’m talking about. OS X has all the command line goodies of Linux but it also has its own great tools like Spotlight that has a command line equivalent built into OS X (it’s called mdfind) and it is infinitely faster than the find command in Linux distros and OS X. So, after getting tired of hunting down linked media in an old Maya scene that had links to old hard drives, moved stock image folders, etc., I made a script that uses mdfind to quickly track down the media by name, take the first result and make a MEL command file that you then drag into the Script Editor to do your relinking:

The script obviously assumes that your files are intelligently named. You’re not going to want to use this if you have a ton of different textures are all named “file.tif” but if you have unique names, this should save you a ton of time if you’re on OS X.

Anyway, without further ado, here is the script.

1 note | Permalink

  1. polygonspixelsandpaint posted this