我为 Maya 脚本配置了 Eclipse。当我尝试运行以下脚本时出现错误。但是 maya.cmds 模块不适用于 PyMEL。
import pymel.core as pm
pm.polySphere()
Traceback (most recent call last):
File "C:\Users\shivani\workspace\pythonFirst\firstModule.py", line 1, in <module>
import pymel.core as pm
File "C:\pymel-1.0.3\pymel\core\__init__.py", line 6, in <module>
import pymel.versions as _versions
File "C:\pymel-1.0.3\pymel\versions.py", line 57, in <module>
_current = _MGlobal.apiVersion()
TypeError: unbound method apiVersion() must be called with MGlobal instance as first argument (got nothing instead)