erreur lorsque l'objet python d'appel à travers le code MEL
Question
Comment résoudre ce problème.
Following error occurs from maya. I am doing the following in Filemenu.mel file. this runs at the startup.
python ( "de saveCentral_fromPath d'importation"); . . .
runSaveCentral global proc () {
python("saveCentral_fromPath.saveCentral()");
python("a._first_()");
}
. . . ligneMenu -label ( "Enregistrer Central") 1 -FR -annotation ( "publish: copie à la zone centrale") -command ( "runSaveCentral ()") publishItem;
# Error: file: S:/xxxxxxxx/scripts/maya/melTEST/FileMenu.mel line 64: class saveCentral_fromPath has no attribute 'saveCentral'
# Traceback (most recent call last):
# File "<maya console>", line 1, in <module>
# AttributeError: class saveCentral_fromPath has no attribute 'saveCentral' #
Brgds,
Knish
La solution
python("import saveCentral_fromPath");
.
..
global proc runSaveCentral()
{
python("saveCentral_fromPath.saveCentral()._first_()");
# filename.classname.functionname
}
.
.
.
menuItem -label ("save Central") -en 1
-annotation ("publish : copy to central area")
-command ("runSaveCentral()") publishItem;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow