View Full Version : importing references with mel

08 August 2008, 10:39 PM
Ok here is the problem.

i have a character that i'm referencing in 4 times.
The character file resides in "y:\Prod\Character\"

I reference this file in 4 times and i change the namespace for each one to :

my quesiton is how to do i import a specific reference with mel?
Using file -importReference "y:\Prod\Character\"
will import the first reference with namespace MOM
but there is no way to import say only the GIRL.
Any thoughts?

08 August 2008, 04:37 AM
try this:

string $importNS="GIRL"; // change the string to the chosen namespace name
string $reqNSNodes[]=`ls ($importNS+":*")`;
string $refNode=`referenceQuery -rfn $reqNSNodes[0]`; // find the ref node through which this node exists
file -importReference -referenceNode $refNode; // import that ref node's contents

did it help ?

08 August 2008, 07:23 PM
that worked perfect.
Thanks Mucho Ashish!!

CGTalk Moderation
08 August 2008, 07:23 PM
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.