I’m working on a production that is looking to make custom save/open/close commands in Maya. My first steps have been defining rules of when it’s OK to save and when it isn’t and I’m implementing that using Maya’s Python API.
I have some code that then gets fed into a single callback which uses my main function manager.checkout_maya_save_check:
import maya.OpenMaya as om
om.MSceneMessage.addCheckCallback(om.MSceneMessage.kBeforeSaveCheck, manager.checkout_maya_save_check)
My problem is, in order for the function "manager.checkout_maya_save_check" to determine if a file is OK to save, I need to know the full path+name of the file the file that the user is trying to save into. Is there a way I can query that string automatically on save?