PDA

View Full Version : using mel to swap references files


ph2003
06-18-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)
http://area.autodesk.com/blogs/stevenr/maya_assets_part_2_working_with_existing_assets

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 .
thanks!

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

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

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

CGTalk Moderation
06-22-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.