I am trying to configure the Eclipse environment to recognize the maya.cmds module, all modules associated with the Maya module. The following code is the tests run in the Eclipse editor and the Maya script.
import maya print 'maya:\n', dir(maya) from maya import cmds print 'cmds:\n', len(dir(cmds))
In the Maya editor, the script outputs
maya: ['OpenMaya', '_OpenMaya', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'app', 'cmds', 'mel', 'standalone', 'stringTable', 'utils'] cmds: 3190 sphere: <built-in method sphere of module object at 0x0000000019F0EEE8>
In Eclipse, the code leads to
maya: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__'] cmds: 6 sphere: Traceback (most recent call last): AttributeError: 'module' object has no attribute 'sphere'
I searched a lot in google group "python inside maya" and in web search. The best I found was the following link, however this did not solve my problem at all, and ended up giving the same result. http://www.luma-pictures.com/tools/pymel/docs/1.0/eclipse.html
I read that I need to set up the environment paths in Eclipse and not on my machine, and I also read the opposite view. What vars environments should be installed, where and in Eclipse, Windows, or both?