Friday, May 3, 2013

maya.cmds help snippet

For a long time I'd leave a mel tab up in the Maya script editor simply to use the help command to print maya help. The help command is also in the maya.cmds module but the syntax is a bit annoying to use.

mel      vs.    python
help ls          cmds.help('ls')


I finally got sick enough of doing this to create a little helper function to place in my userSetup.py


#Convenience function for maya.cmds.help
def docs(fn):
    print cmds.help(fn.__name__)

So now I can just go...
docs(cmds.ls)

Woooohoooooo

No comments:

Post a Comment