We want to use references in Maya as "proxies" so we'll only have one copy of the geometric data in a referenced file in the game and all worlds reference that single copy. This means that when exporting files we need the names of referenced files attached to particular objects. Unfortunately, the docs are pretty spare on information when it comes to references. It describes reference nodes in the DG reference but doesn't say how or where to access them. What's worse, it doesn't have an MFn class for them - the only compatible MFn class is the MFnDependencyNode so I can't use hasFn to recognize a reference node even if I try to walk through the DAG/DG tree. Even if I was able to find one, it's not clear how they hook the referenced items in the current scene. They've got a list of SetAttr strings according to the documentation, but I'm not sure what's in these. At the same time, you can get info as to whether a particular node is referenced and a list of all referenced files.
One option I'm thinking of is to write a special property on all top level objects when saving files which just has the file name. Then when exporting a file I can look to the standard Maya call to see if an object is referenced and if so, pull it's file name from the specially saved property.
Question is whether anybody has any better ideas or enough info about reference nodes to allow me to extract the information from them.
Thanks in advance!
Darrell Plank
darrellp@suckerpunch.com