Any ideas how to get this to work?
history = []
def func(refCode, file, clientData):
global history
history.append([args, kwargs])
return True
cb =
OpenMaya.MSceneMessage.addCheckFileCallback(OpenMaya.MSceneMessage.kBeforeReferenceCheck,
func, None)
# Error: in method 'MSceneMessage_addCheckFileCallback', argument 2 of
type 'MMessage::MCheckFileFunction'
# Traceback (most recent call last):
# File "<maya console>", line 8, in <module>
# TypeError: in method 'MSceneMessage_addCheckFileCallback', argument
2 of type 'MMessage::MCheckFileFunction' #
Seems like Maya's python doesn't find 'func' compatible with
'MMessage::MCheckFileFunction'. I tried defining func as 'def
func(*args, **kwargs)', and that made no difference...
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---