Way to detect if an unload is triggered by a reference replacement / reload?

15 views
Skip to first unread message

Paul Molodowitch

unread,
Sep 25, 2014, 3:00:59 PM9/25/14
to python_inside_maya
Hey all - i was wondering if any of you knew of a way to tell, when you're inside of a reference unload callback - ie, MSceneMessage.addCallback(kAfterUnloadReference) - whether it's done as the result of an attempt to replace or reload a reference - ie, if you did cmds.file("newPath.ma", loadReference="refNodeRN").

For instance, inside of a file new callback, you can use MFileIO.isOpeningFile() to tell whether the new operation is as the result of a file open - I'd be looking for something similar to tell if a unload reference is as the result of a load reference.

Anybody ever done anything like this?
Reply all
Reply to author
Forward
0 new messages