Join Aaron F. Ross for an in-depth discussion in this video Resolving dependency issues with the File Path Editor, part of Maya Tips and Tricks.
If for any reason your links to dependent files get broken and you still have the files somewhere, then Maya can help you by healing all of the paths and also by copying the files into the current project where they belong. Here I've got a scene in which I've actually created a material that links to a file that doesn't exist. And if I select the picture plane and open up the attribute editor with Ctrl+A, I can go over to the Picture Lambert tab, and as soon as I do I get an error message down here.
And it says warning texture file C:\Users\Aaron Ross\Desktop\Random Folder\SpiderAndThistle doesn't exist, node file one. So by node file one they mean that there is a file node, and inside that file node, there is a link that's broken. Let's go into that file node, click on the little arrow here in the Color section of the material. And in this file node, the image name here, or the path, is pointing to a place that doesn't exist. So I did this deliberately just to demonstrate the issue.
So it's trying to find a file that's inside a folder called Random Folder, and that random folder doesn't exist. So if we know where the files are, then we could copy them over manually. But we would also have to rebuild all of these paths and that would be a tedious process. Well we can use the Maya File Path Editor, which will accomplish all of that for us in an automated fashion. And it's very handy, so let's take a look at it. We'll go into the Window menu and choose General Editors > File Path Editor.
Go ahead and open that up. And what we see here are red x's, meaning that we have broken links. And if we continue to open up these hierarchy arrows, you'll see that it's looking for a texture file inside a folder. And that folder's not found and also the file is not found. We can fix this all at once, just by selecting the top level here. And we then can click on this Auto Resolve button. And in the Auto Resolve dialog, we need to put in a file path of where we want Maya to look to find the textures.
Where it says, Base Path, I'll click Browse. And I know that my files are somewhere on the desktop. So I'll just go ahead and click Desktop. Click Set. So now Maya is going to look to all of the folders and subfolders on my desktop. And if Maya finds the necessary file or files, then we can copy them. So, the Copy Files check box is on, but we need to manually set the destination. So, I'll click Browse, and just go over into the current project section, and click Source Images.
That's where the files are going to get copied to, and click Set. And down here we have the option to copy and re-path all the files or only the newly resolved files. In other words, we may have run this command once before and we don't want to keep repeating the same thing and copying over the same files every time. But in this case it won't matter. So again it's going to copy the files over, the one that's missing. And it's also going to fix this path here. And it could do this for all of textures in your entire scene all at once.
All right very cool. So I click on Auto Resolve and it's done. And now we've got check boxes here, so the green check means that everything's been fixed and we're happy. So we can close this window. And as you can see here, we've got the image applied. Can select that geometry once again. Go back to the attribute editor to Picture Lambert. Back to the Color section and click on that file node. And now the image path, shown here, is relative. It's no longer an absolute path. It doesn't show a drive letter or volume name.
It simply starts with Source Images. And that means that Maya will look inside the current project's source images, wherever that project is. We could move the whole project folder to a different location, a different drive, even a different computer or network. And, as long as we've set the project, previously. Then, all of the links will be found. Because they're relative to wherever the current location of the root of the project is. Okay, so, that's the file path editor, which is very handy.
Not just because it can recursively find and copy files to where they need to be. But also because it can automatically heal any issues with the file paths.
- Managing projects assets
- Versioning scenes
- Importing, exporting, and sending scenes to other applications
- Referencing files
- Populating a master scene with assembly references
- Loading and unloading modules
- Setting options for new scenes
- Customizing Maya's interface