The power of ChatGPT directly in Autodesk Maya
chat.openai.com
- Interactive chat window with ChatGPT
- Get AI generated tips, instructions or ideas
- Automate tasks in a simple manner
- Run and/or copy the code blocks from within chat window
- Download this repository and place it somewhere permanently*
- Right click on
setup_windows.bat
and choose Run as administrator - Open Maya and load the plugin
chatGPTForMayaPlugin.py
from the list - A new Maya menu should show up called
ChatGPT
- Click on the option box for ChatGPT > Open chat
- Get an API key from openai.com
- Enter your API key into
OpenAiApiKey
and save settings
Notes:
- If you move it later you might have to re-run the setup
Setup openai with virtual environment
Setting up a virtual environment is optional but recommended to avoid conflicts with libraries and potentially cause instability in Maya.
- Create a symlink for
mayapy.exe
calledpython.exe
in the same foldermayapy.exe
is located inC:\Program Files\Autodesk\Maya<VERSION>\bin
- Autodesk provides instructions for doing this here
- Create a virtual environment using
python.exe
- Run
pip install openai
in your virtual environment - Run
pip show openai
and copy the path from Location:
Notes:
- If you want to avoid making any changes to your Maya environment whatsoever you can create virtual environment using pyenv and python version 3.7.7 (for Maya 2022)
Setup openai
Skip this section if you did the steps in the virtual environment section
- Run
cmd
inC:\Program Files\Autodesk\Maya<VERSION>\bin
- Run
.\mayapy.exe -m pip install openai
- Run
.\mayapy.exe -m pip show openai
and copy the path from Location:
Setup repository
- Clone this repository
- Modify contents of module/chatGPTForMayaModule.mod to look something like this:
+ ChatGPTForMaya 0.1 C:\path\to\ChatGPTforMaya\ PYTHONPATH += C:\path\to\ChatGPTforMaya\ PYTHONPATH += C:\path\to\virtualenv\ChatGPTforMaya\chatgpt4maya\src\venv\Lib\site-packages MAYA_PLUG_IN_PATH += C:\path\to\ChatGPTforMaya\plugin
- Add
C:\path\to\ChatGPTforMaya\module
toMAYA_MODULE_PATH
environment variable - Get an api key from openai.com
- Optional: Add API key to
OPENAI_API_KEY
environment variable
- Optional: Add API key to
- Open Maya and load the plugin
chatGPTForMayaPlugin.py
from the list - A new Maya menu should show up called
ChatGPT
- Click on the option box for ChatGPT > Open chat
- Enter your API key into
OpenAiApiKey
- Enter the path you got from
pip show open
intoOpenAILibraryPath
This project is licensed under a Modified BSD license.
Copyright (c) 2023 Johannes Andersson.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
I am not affiliated, associated, authorized, endorsed by, or in any way officially connected with Autodesk, OpenAI, ChatGPT, or any of its subsidiaries or its affiliates.
The official ChatGPT website can be found at https://chat.openai.com.
The official Autodesk website can be found at https://autodesk.com.
The names OpenAI and ChatGPT as well as related names, marks, emblems and images are registered trademarks of their respective owners.
- Write usage instructions
- Add clear conversation button
- Add quick command feature
- Original idea came from seeing Jiacheng Xu's integration of ChatGPT in Nuke