Here's what I have so far.
Code:
def before(*args, **kwargs): print 'BEFORE: ' + cmds.file(query = True) def after(*args, **kwargs): print 'AFTER: ' + cmds.file(query = True) om.MSceneMessage.addCallback(om.MSceneMessage.kBef oreOpen, before) om.MSceneMessage.addCallback(om.MSceneMessage.kAft erOpen, after)
Case scenario1; In scene test_01.ma, OPEN scene test_02.ma
Works as expected.
#BEFORE: ../../test_01.ma
#AFTER: ../../test_02.ma
Case scenario2; In scene test_01.ma, SAVE scene test_02.ma
DOESN'T work as expected.
#BEFORE: ../../test_02.ma
#AFTER: ../../test_02.ma
I also tried 'kBeforeSaveCheck' callback, with same result.