Autodesk Maya - maya.cmds library in Pythonista
KenoliArt last edited by
I’m wondering whether I can to get the maya.cmds and OpenMaya libraries into Pythonista. Mainly for the convenience of having autocomplete when I’m writing Maya scripts away from my workstation. Is this is possible? If so, how would I go about it?
JonB last edited by
You won't be able to run any of those, since they rely on C++ modules, I think.
But, you probably will be able to download them and install in site packages so that autocomplete works. (You'd be able to autocomplete classes that were written in pure python, but not any from c modules).
You can try installing stash https://github.com/ywangd/stash, then you might try using
pip installto install the module. However, it will most likely fail to install, if there were c dependencies. For instance, OpenMaya looks like it has c++ dependencies, so will fail. cmdx looks to be a wrapper around maya.cmds, written purely in python, so should install without issues.
In the case where pip install fails, what often works is to use
pip download,then use tar or unzip commands to extract the archive, then move the main python folder to site-packages. That should let you write code that imports the module, and jedi should parse what it can and autocomplete anything that exists in pure python.