2010-06-30 5 views
0

해결 방법.MEL 코드를 통해 파이썬 객체를 호출 할 때 오류가 발생했습니다

Following error occurs from maya. I am doing the following in Filemenu.mel file. this runs at the startup. 

python ("import saveCentral_fromPath"); . . .

글로벌 시저의 runSaveCentral() {

python("saveCentral_fromPath.saveCentral()"); 
python("a._first_()"); 

}

. . . menuItem -label ("중앙 저장") -en 1 -annotation ("게시 : 중앙 영역으로 복사") -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,

크니 쉬

답변

0
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; 
관련 문제