[Maya Python] Autocomplete for maya.cmds and Aptana?
Has anybody using Aptana and/or Eclipse figured out how to get PyDev to autocomplete and correctly recognize defs from maya.cmds and the other builtins?
It's particularly irritating since the autocomplete works in an active Aptana console -- but the code analysis doesn't do whatever the console is doing so you need to hunt down every !$!&* cmds.whatever or you code is a mass of red squiggles. It's not exactly important, but I'm heartily sick of #@UndefinedVariable.
I know there's a stubs file for pyMel, is there one for maya.cmds?
I'm using Eclipse and am getting autocomplete for each maya.cmds, maya.openMaya and pyMel
I just followed the instructions there and it worked out great.
Unfortunately it doesn't give me a list of arguments that the functions/methods will accept. so i still keep documentation handy for that.
Last edited by dgovil; 05-01-2012 at 09:21 PM.
Sr Environment Artist
there is (was?) a stub for maya.cmds with the install of pymel. that was the only way I got intellisense to work properly with Pycharm for the python commands.
Originally Posted by Theodox
I believe it was not yet part of the pymel files for 2011/2. Maybe it is with 2013?
Either way, you should be able to find it in the full download here
Is there a preferred location for storing the stubs file?
I'm using Eclipse and if I have 'site-packages' in my list of libraries for my PyDev Python Interpreter it will read the empty __init__ file found under that location and not read any of the commands from the stubs file.
If I leave 'site-packages' out of the list auto-complete works fine and everything still runs fine when I send it over to Maya, however I don't know whether this is a bit of dangerous work around...