Created
August 27, 2016 22:23
-
-
Save r4inm4ker/69ff3c0313b6aff6cd7767061604c2dd to your computer and use it in GitHub Desktop.
callbackOnImport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
source : https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/python_inside_maya/rpO70NI1jc0/I10eDlxZCQAJ | |
''' | |
import maya.OpenMaya as om | |
def catchFileImport(ret, fileObj, *args): | |
print "Importing:", fileObj.resolvedFullName() | |
om.MScriptUtil.setBool(ret, True) | |
mid = om.MSceneMessage.addCheckFileCallback(om.MSceneMessage.kBeforeImportCheck, catchFileImport) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment