💡Operator

The "Cy-GPT: Operator" is a Blender add-on that uses the LLMs (Large Language Models) to generate and run scripts based on user input. It essentially serves as a co-pilot, generating Python scripts and executing them directly in Blender.

Usage

Access the addon's panel:

  1. Open a 3D Viewport in Blender.

  2. In the 3D Viewport, locate the Tool Shelf on the right side.

  3. Look for the "CY-Tools" tab and click it to reveal the "Blender Transformer" panel.

After you have entered your API key from OpenAI, you can proceed to type in a prompt, here are a couple of examples: " Create 5 cubes in a row"

"Make the world background color red"

"Add 10 lights at random positions"

"Create a camera that constantly looks at the center cube"

"Delete all the lights in the scene"

"Rotate all the objects in the scene randomly"

"Render the selected cameras"

The GPT model will process the user input and generate a Python script as per the request, which will be executed directly in Blender. The AI Response field shows the script generated by the GPT model.

The add-on maintains a list of generated scripts, which are displayed under the "Generated Scripts" section. Each script can be opened in the Text Editor or deleted from the list.

Recommendations

Try to be concise with your information such as specifying the exact number of items your are looking to generate.

Limitations and Warnings

Please remember this addon is very experimental and will occasionally cause Blender to crash. Moreover, the current base dataset was based on information about Blender that is already outdated for a lot of tasks (2019-2021). For instance with the prompt "Change the background color to ultraviolet" it will most likely work, but not in the newer world node shading system. If you untick "Use-Nodes" in your world properties, you will see the color displaying.

These issues will hopefully be solved in the future as I iterate on this tool to include a fine tuned model as well.

You must use your own API key to interact with OpenAI's API. Also, please be aware that the API is subject to usage limitations as specified by OpenAI's terms and conditions.

Installation

  • Downloaded the latest zip.

  • Open Blender, go to Edit > Preference > Addons > Install...

  • Locate and select the downloaded Python script file and click Install Add-on

  • In the Add-ons tab, search for "CY-GPT" in the search bar. Check the checkbox next to the addon's name to enable them.

OpenAI

  1. Go to: https://openai.com/api/ and create an account

  2. After setting up billing, head to https://platform.openai.com/api-keys and generate an API key.

  3. Select GPT-4o, GPT-4, or GPT-3.5 in Cy-GPT preferences.

  4. Model should be ready to use! (Visit https://platform.openai.com/usage to track your usage)

Ollama

  1. Download and install: https://ollama.com/

  2. Open terminal and type: 'Ollama run llama3' to download and run the model once. You can then close the terminal window.

  3. Open a new window and type 'Ollama serve'.

  4. Select Llama3-8b in Cy-GPT preferences.

  5. Model should be ready to use! (This is running on your computer so there aren't any costs associated.)

Last updated