How to get reference file when it is not correctly loaded?

How to get reference file when it is not correctly loaded?

Anonymous
Not applicable
2,329 Views
3 Replies
Message 1 of 4

How to get reference file when it is not correctly loaded?

Anonymous
Not applicable
I have a maya scene made in windows and opened in linux, obviously it can't find it's reference as it uses absolute path. In order to correct it, firstly, I need to know the original file path such as 'Z:\model\model.mb', so that I can look for model.mb and get its path in linux. I use commands below:
string $allrefs[] = `file -q -r`;

But it seems this line only works when reference is successfully reached, if maya can not find the reference file, it returns nothing.
0 Likes
2,330 Views
3 Replies
Replies (3)
Message 2 of 4

burgeso
Alumni
Alumni
Even if the reference file wasn't found at the given path, the reference node (that stores the reference edits) will still be created in your scene. Querying this reference node will return the path of the associated file:

referenceQuery -f cubeRN;
// Result: C:/cube.ma

Hope that helps,
Owen


Owen Burgess
Maya Support Specialist
Product Support
Autodesk, Inc.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Firstly, thanks a lot. I have been waitting this reply for a long time 🙂
I have tried this, but it does not seem to be working.

referenceQuery -f FaSheChangRN;
// Error: Reference node 'FaSheChangRN' is not associated with a reference file. //


Even if the reference file wasn't found at the given path, the reference node (that stores the reference edits) will still be created in your scene.

Hope that helps,
Owen


Yeah, that's right, it has the reference node, but not the 'filename' attribute.

PS: I'm using maya2011 for linux
0 Likes
Message 4 of 4

Anonymous
Not applicable
Even if the reference file wasn't found at the given path, the reference node (that stores the reference edits) will still be created in your scene. Querying this reference node will return the path of the associated file:

referenceQuery -f cubeRN;
// Result: C:/cube.ma

Hope that helps,
Owen


Oh,this doesnt work,who can help me?I'am going mad 🙂
And this problem is also with cache file, i.e.you never know it's original path unless maya has loaded it correctly.
0 Likes