Resolving file references via c++ api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm working with a legacy model pipeline that uses the Maya 2013 C++ libraries to process a large batch (hundreds) of models. Some of these models have file references that are absolute and incorrect for the machine the batch is running on. And given the existing workflow of the pipeline, these file references are essentially immutable. I've been looking for a way to remap these file references to match the directory structure of the batch machine, but all of my attempts have proven fruitless.
I've specifically tried all variations (different reference modes, wantUnresolvedNames=true, etc.) of MFileIO::open(), MFileIO::getReferences(), and MFileIO::getFiles(). If the referenced file is at the expected path then these calls return the expected references, but if the referenced file is missing then I get nothing.
Is there a right way to do this? Is this the right part of the pipeline to be doing this sort of thing?