Monday, September 26, 2011

Changing namespace to A mel script

Hi, i was looking around the internet and i was able to piece together a mel script that changes name space, its not that great but it's a lot faster switching characters to namespace A in the reference editor.
So this is the script

file -e -namespace "B" -referenceNode "B" "C:/Users/Tim Li/Desktop/Animation3//scenes/morpheusRig_openReleaseCandidate_v02.mb{1}";
file -e -namespace "A" -referenceNode "A" "C:/Users/Tim Li/Desktop/Animation3//scenes/morpheusRig_openReleaseCandidate_v02.mb";

Namespace "  " is what you want to change the name space to be.
referenceNode " " is the name space you have currently set for that character.
The location is where the reference material is stored. So if you referenced two characters from the same file, maya usually just adds {1} to the end

You then make two mel scripts (or how ever many characters you have in the scene)

This is to change character 1 into namespace A
file -e -namespace "B" -referenceNode "B" "C:/Users/Tim Li/Desktop/Animation3//scenes/morpheusRig_openReleaseCandidate_v02.mb{1}";
file -e -namespace "A" -referenceNode "A" "C:/Users/Tim Li/Desktop/Animation3//scenes/morpheusRig_openReleaseCandidate_v02.mb";

This is to change character 2 into namespace A
file -e -namespace "AB" -referenceNode "A" "C:/Users/Tim Li/Desktop/Texturing and lighting/Animation3//scenes/
morpheusRig_openReleaseCandidate_v02.mb";
file -e -namespace "A" -referenceNode "B" "C:/Users/Tim Li/Desktop/Texturing and lighting/Animation3//scenes/morpheusRig_openReleaseCandidate_v02.mb{1}";

hope this helps

No comments: