通过MEL代码调用python对象时出错
如何解决这个问题通过MEL代码调用python对象时出错,python,maya,Python,Maya,如何解决这个问题 Following error occurs from maya. I am doing the following in Filemenu.mel file. this runs at the startup. python(“导入saveCentral_fromPath”); . . 全局进程runSaveCentral() { } 。 . . 菜单项-标签(“保存中心”)-en 1 -注释(“发布:复制到中心区域”) -命令(“runSaveCentral()”)pu
Following error occurs from maya. I am doing the following in Filemenu.mel file. this runs at the startup.
python(“导入saveCentral_fromPath”);
.
.
全局进程runSaveCentral()
{
}
。
.
.
菜单项-标签(“保存中心”)-en 1
-注释(“发布:复制到中心区域”)
-命令(“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' #
#错误:文件:S:/xxxxxxxx/scripts/maya/melTEST/FileMenu.mel第64行:类saveCentral\u fromPath没有属性“saveCentral”
#回溯(最近一次呼叫最后一次):
#文件“”,第1行,在
#AttributeError:saveCentral_fromPath类没有属性“saveCentral”#
Brgds
克尼什
# 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' #
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;