pythonmayainterpreternukehoudini

Is it possible to develop across multiple software packages (Maya, Houdin, Nuke, etc) from a single master interpreter?


I'm developing universal tools that work across various CG software packages such as Maya, Houdini, Nuke, etc., and I'm wondering if there's a workflow for merging each software's custom interpreter into a single master interpreter inside a virtual environment?

To elaborate:

I know how create a custom environment for Maya development in PyCharm, but this only works with mayapy.exe as the interpreter. I'd ideally like to use a clean python.exe as my master interpreter, then add packages for each software in order to get completion working.

Here's a gist of the script I've been working with. All it needs is PySide and Qt.py installed into a Python 2.7 venv to run. If I do all the steps from the first link (Maya dev in PyCharm) EXCEPT use mayapy.exe as the interpreter and instead use python.exe I've found that autocompletion actually works, but the script will not execute unless I'm using the mayaypy.exe as the interpreter.

I guess my main problem is I'm not sure if this is even possible. And if it is possible I'm not sure what packages to use or how to find out what packages I need.


Solution

  • You may have to make some mocking (see mock module) or use external interpreters of each application.

    You can also clone to your main python site-packages the application's commands in order to have the auto-completation. If I remember nuke has already a clone for autocompletion but maya is more tricky.

    ---EDIT--- I remember only for nuke and maya (the ressources for maya is old but might be helpful)

    For nuke :

    http://www.nukepedia.com/written-tutorials/using-eclipse-with-nuke http://www.nukepedia.com/python/misc/nukepydummy https://help.thefoundry.co.uk/nuke/content/comp_environment/configuring_nuke/command_line_operations.html

    For maya :

    https://www.highend3d.com/maya/downloads/applications/syntax-scripting/c/eclipse-autocompletion-for-maya-python-api https://help.autodesk.com/cloudhelp/2017/ENU/Maya-Tech-Docs/PyMel/eclipse.html http://www.toadstorm.com/blog/?p=136