I was curious if anyone has tried to do this. Basically we are trying
to prevent maya from loading any references by default and instead
load them ourselves. This is because there are some references we
'auto cleanup' and some we don't. I am trying to do this by setting
an "addCheckFileCallback" on "kBeforeLoadReferenceCheck".
This gets called for every Reference that "wants" to be loaded, caches
the file path, and prevents Maya from doing the reference. This
method has a FileObj representing the reference about to be loaded as
an argument. Now for the majority of scene files, this will work, but
there will be problems if the same file is referenced multiple times.
I can't find any way to connect the FileObj to a ReferenceNode? The
only workaround I can think up is to just add a "{%d}" % i to the end
of the string, but even that method will find an issue of you are
opening a scene with multiple references of the same file, and they
aren't all loaded. Any thoughts on this? Thanks a lot!
--
http://groups.google.com/group/python_inside_maya