https://github.com/thejoltjoker/chatgptformaya
Autodesk Maya plugin for context aware chatting with ChatGPT. Get tips, automate tasks and run code.
https://github.com/thejoltjoker/chatgptformaya
chatgpt chatgpt-maya maya maya-plugin openai
Last synced: about 1 year ago
JSON representation
Autodesk Maya plugin for context aware chatting with ChatGPT. Get tips, automate tasks and run code.
- Host: GitHub
- URL: https://github.com/thejoltjoker/chatgptformaya
- Owner: thejoltjoker
- License: bsd-3-clause
- Created: 2023-04-16T18:54:22.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-09T22:07:34.000Z (over 2 years ago)
- Last Synced: 2025-03-29T01:34:18.035Z (over 1 year ago)
- Topics: chatgpt, chatgpt-maya, maya, maya-plugin, openai
- Language: Python
- Homepage: http://chatgptformaya.thejoltjoker.com/
- Size: 2.16 MB
- Stars: 32
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ChatGPT for Maya
The power of ChatGPT directly in Autodesk Maya
chat.openai.com
# Features
- 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
# Installation
## Windows
### Automatic installation
1. Download this repository and place it somewhere permanently*
2. Right click on `setup_windows.bat` and choose _Run as administrator_
3. Open Maya and load the plugin `chatGPTForMayaPlugin.py` from the list
4. A new Maya menu should show up called `ChatGPT`
5. Click on the option box for _ChatGPT > Open chat_
6. Get an API key from [openai.com](https://platform.openai.com/account/api-keys)
7. Enter your API key into `OpenAiApiKey` and save settings
_Notes:_
- If you move it later you might have to re-run the setup
### Manual installation
**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._
1. Create a symlink for `mayapy.exe` called `python.exe` in the same folder
- `mayapy.exe` is located in `C:\Program Files\Autodesk\Maya\bin`
- Autodesk provides instructions for doing
this [here](https://help.autodesk.com/view/MAYACRE/ENU/?guid=GUID-6AF99E9C-1473-481E-A144-357577A53717)
2. Create a virtual environment using `python.exe`
3. Run `pip install openai` in your virtual environment
4. 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_
3. Run `cmd` in `C:\Program Files\Autodesk\Maya\bin`
4. Run `.\mayapy.exe -m pip install openai`
4. Run `.\mayapy.exe -m pip show openai` and copy the path from _Location:_
**Setup repository**
1. Clone this repository
2. 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
```
3. Add `C:\path\to\ChatGPTforMaya\module` to `MAYA_MODULE_PATH` environment variable
4. Get an api key from [openai.com](https://platform.openai.com/account/api-keys)
- _Optional:_ Add API key to `OPENAI_API_KEY` environment variable
6. Open Maya and load the plugin `chatGPTForMayaPlugin.py` from the list
7. A new Maya menu should show up called `ChatGPT`
8. Click on the option box for _ChatGPT > Open chat_
9. Enter your API key into `OpenAiApiKey`
10. Enter the path you got from `pip show open` into `OpenAILibraryPath`
# Links
- https://github.com/openai/openai-cookbook/blob/main/techniques_to_improve_reliability.md
# License
This project is licensed under a [Modified BSD license](https://spdx.org/licenses/BSD-3-Clause.html).
```
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.
```
# Disclaimer
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.
# Todo
- Write usage instructions
- Add clear conversation button
- Add quick command feature
# Credits
## Fonts
- [Inter](https://fonts.google.com/specimen/Inter)
- [Sofia Sans](https://fonts.google.com/specimen/Sofia+Sans)
- [Jetbrains Mono](https://fonts.google.com/specimen/JetBrains+Mono)
- [Montserrat](https://fonts.google.com/specimen/Montserrat)
- [Font Awesome](https://fontawesome.com/)
## Other
- Original idea came from seeing Jiacheng Xu's integration
of [ChatGPT in Nuke](https://github.com/JiachengXuGit/ChatGPTforNuke)