View Full Version : using mel to swap references files

06 June 2010, 04:12 PM
hmm im trying to get a node with a attribute that controling my file references, just like wat this vid did (swaping the misslie throught channel box)

im not programing expert, i tried with a simple expression but it did not work :(
it locked out the atribute after i place this code:
if (locator1.Ref=0) {
file -loadReference "ChairRN" -type "mayaBinary" -options "v=0" "G:/Production/scenes/Chair.mb";
if (locator1.Ref=1) {
file -loadReference "ChairRN" -type "mayaBinary" -options "v=0" "G:/Production/scenes/books.mb";

any idea would be apreciated .

06 June 2010, 11:46 PM
if (`getAttr "locator1.Ref"` == 0)

if (`getAttr "locator1.Ref"` == 1)

06 June 2010, 11:12 AM
cool it works now.
but i had to refresh the scenes to make it reload the references. :(

CGTalk Moderation
06 June 2010, 11:12 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.