PASTED_
In maya the copy paste feature can be really useful. The major downside however is that every node that gets pasted gets a nice:
PASTED_ prefix attached to it. Resulting in a horribly messy scene that no one ever cares to clean up… until you have to revisit the scene and have to dive into the world of pasted_ nodes trying to find the correct shader etc.
Now there is a really easy fix for it:
In your maya instalation directory there is a file called cutCopyPaste.mel (of course thanks autodesk … )
in that is a function called pasteScene()
replace that function with the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
global proc pasteScene(){ string $fileExt = ".mb"; if (`about -ltVersion`) { $fileExt = ".mlt"; } else if (`about -evalVersion`) { $fileExt = ".mp"; } // determine temp directory string $tmpFile = "/maya_sceneClipBoard" + $fileExt; string $tmpdir = `getenv TMPDIR`; string $filePath = ($tmpdir + $tmpFile); // import scene string $newTransforms[] = `file -force -import -renameAll false -mergeNamespacesOnClash true -namespace ":" -groupReference -returnNewNodes $filePath`; select -replace $newTransforms; select -replace `ls -sl -head 1`; } |
This will merge all the pasted nodes directly into the scene (root namespace ) without adding any prefix or suffix. (Only when the node all ready exists in the same depth it will add a number to the end).
Root Namespace
Whenever I loaded in a referenced scene maya would create a namespace (either with an normal namespace or it would prefix the nodes with the filename and an underscore). However Autodesk has finally been nice enough to open the functionality in the UI to load a scene into the root namespace (making sure the referenced scene does not get any weird naming or namespace. Making it easier to work with)
When going to File > Create reference
The trick is not to disable namespaces on load but enabling them and selecting the : ( root ) namespace and set the following option:
Merge into selected namespace and rename …