4-Archiving: Best Solution for Setting Up a Maya Project for Already Existing Scenes

As I have mentioned before, it is always best to set up the Maya Project before starting with a Maya scene. The good news is that setting up a Maya Project for an already existing Maya scene is still possible. However, it takes some extra work because you need to first gather all external files related to your scene and then reconnect them so that files’ paths become relative paths.

First, we need to know where all the external files connected to the scene are. We can do this in multiple ways. My suggestion is to do that through archiving your scene because this way you can be sure that you have located all external files.

4-1-Archive Scene

Through archiving, all files related to the Maya scene are packaged and saved into a zip file placed in the same directory as the scene file. To archive a Maya scene, go to File>Archive Scene. Then find the zip folder that is going to be placed at the same folder as your scene file and unzip it. You may look inside the unzipped folder and see where every external file such as image textures, sound files, …are.

Figure 4-1. Location of an image texture in an example archived and then unzipped scene.

Side note1: Any folder that you see in the unzipped file has at least one file that is connected to your scene. Sometimes you need to go inside many sub-directories to find the files. To demonstrate that I give you an example. I imported one of the default Pixar Outdoor Environment Maps to my scene and then archived my scene. As you can see in Figure 4-1, the image texture assigned to this environment map was located in the application folder of my computer when I archived my scene.

Now would be a good time to create and set a new Maya Project (if you don’t know how to do so, return to lesson 1, 2, and 3). After creating and setting up a new Maya Project copy your scene file to the scenes folder of the project, and copy all the external files to their corresponding sub-folder in the project folder. Now, everything is ready for reconnect the external files. Let’s see how!

Side note 2: It is necessary to place all files under the Project Folder directory. Maya doesn’t care if you stack all files in the same directory as the project folder or put them in their relative subfolders. However, it is best practice to arrange external files related to the scene into their relevant folder. Besides, If you ever decide to work in the Industry, it is a MUST to arrange your files in such a way that is easily accessible to your colleagues.

4-2-Reconnecting External Files

Your scene file and also all external files related to your scene are now under the newly set Maya Project folder. Now it is time to reconnect all external files so that relative paths replace the absolute paths to external files. The best way to do this is through File Path Editor in Maya. In the Maya menu, go to Windows>General Editors>File Path Editor. A window is going to pop as seen in Figure 4-2.

Figure 4-2. Use File Path Editor and Attribute Editor to reconnect external files after setting up Maya Project and generate relative paths.

Side note 3: In the File Path Editor, you see green check marks if the path is correct and red crosses if the path is broken. Just pay attention that the green marks only tell you that the path is working, not the path is relative. So even for the green marked paths you need to reassign external files after setting up the Maya Project so that the relative paths replace the absolute paths. Check the Related Topics and Tutorials section if you want to know about the subject.

If you have Attribute Editor open on the side and click on each file path, you may see the path to the external file. Now you just need to go to each path and point it to the external file. As you do so, the absolute paths become relative because you have already set the project. Once you fixed all paths, save the scene. Just to be sure that every path is correct, archive your scene and unzip the archived file. If you have fixed every path correctly, your unzipped folder should only contain one folder at each level until it reaches your project folder as seen in Figure 4-3.

Once you have archived your scene, unzipped it and made sure that all the external files are inside the Maya Project folder, you are ready to move your Maya scene to another computer! Just grab the Maya Project folder and transfer it to any other computer. The only thing you need to do before opening the scene is to set up the Maya Project and you are good to go!

Figure 4-3. How the unzipped archived folder looks like if all the paths are correct.

Side note 4: It is best practice to Work with the Hypershade window when assigning image files to shaders. This way you can keep track of external files connected to your scene and maintain a clean and easy to work scene which is crucial if you want to work in the industry. Check the Related Topics and Tutorials section if you want to know more about working with scene assets in Hypershade window.