This add-on requires an API key to access an OpenAI API.
You need to create an OpenAI account and get an API key from the
OpenAI Official Site.
Note that you need to pay to use an OpenAI API.
Before using this add-on, check the Pricing Page.
Once you have got an API key, enter the OpenAI API key in the add-on
preferences (a).
Click the [Check API Connection] button (b) and check if the status is
OK (c).
If the status is not OK, see the error message and solve the issue.
If you are behind the proxy, input [HTTP Proxy] and [HTTPS Proxy].
You can change the other properties in the add-on preferences.
Code Tool supports the audio input.
To enable the audio input, click [Enable Audio Input] button on the category
at the add-on preferences.
You can see the statistics for the usage of the OpenAI API.
Note: These statistics are not perfect for now. We recommend you to check the usage detail on the OpenAI website.
The add-on preferences allows you to change the behavior of the operators.
Category | Property | Description |
---|---|---|
System | Popup Menu Width | Width of the popup menu from workspace tools. |
Async Execution | Execute operations asynchronously. | |
Show Status | Show request status. | |
Audio Tool | Audio Tool Model | Model to be used for Audio Tool. (Supported Model: whisper-1) |
Chat Tool | Chat Tool Model | Model to be used for Chat Tool. (Supported Model: gpt-3.5-turbo, gpt-4, gpt-4-32k) |
Wrap Width | Wrap width of the chat tool log | |
Code Tool | Code Tool Model | Model to be used for Code Tool. (Supported Model: gpt-3.5-turbo, gpt-4, gpt-4-32k) |
Audio Input Configuration > Language | Language for the audio input in the code tool. This property is enabled when the audio input is enabled. |
|
Recording Configuration > Format | Formats for the audio recording. This property is enabled when the audio input is enabled. |
|
Recording Configuration > Channels | Channels for the audio recording. This property is enabled when the audio input is enabled. |
|
Recording Configuration > Rate | Sampling rate for the audio recording. This property is enabled when the audio input is enabled. |
|
Recording Configuration > Chuck Size | Frames per buffer. This property is enabled when the audio input is enabled. |
|
Recording Configuration > Silence Threshold | Threshold to stop the audio recording. This property is enabled when the audio input is enabled. |
|
Recording Configuration > Silence Duration Limit | The seconds to stop the audio recording. This property is enabled when the audio input is enabled. |
Image Tool can generate/edit an image.
Image Tool can be accessed from [OpenAI] tab on the Sidebar Panel or
from the tool [OpenAI Image Tool] in Image Editor.
There are 2 ways to generate an image from a prompt.
- Go to Image Editor.
- Open [OpenAI] tab on Sidebar.
- Open a [Generate Image] sub-panel.
- Change the properties.
- Enter a prompt. (a)
- Click the [▶] button. (b)
- The generated image appears in the [Generated Images] sub-panel and loaded into the Image Editor. (c)
Note: The generated image will be saved in
<addon_folder>/_data/image/genereated
.
Properties | |
---|---|
Size | The size of the images to generate. |
Num | The number of images to generate. |
Name | Name for a generated image. If [Auto] is checked, the name will be generated automatically. |
You can load a generated image into Blender or parmanently remove it from a file.
- Go to Image Editor.
- Select the tool [OpenAI Image Tool]. (a)
- Press the 'SPACE' key in the Image Editor, and the pop-up dialog appears. (b)
- Enter a prompt and change the property values. (c)
- Click the [OK] button. (d)
- The generated image appears in the [Generated Image] sub-panel.
Note: The generated image will be saved in
<addon_folder>/_data/image/genereated
.
Properties | |
---|---|
Size | The size of the images to generate. |
Num | The number of images to generate. |
Name | Name for a generated image. If [Auto] is checked, the name will be generated automatically. |
- Go to Image Editor.
- Open [OpenAI] tab on Sidebar.
- Open a [Edit Image] sub-panel.
- Change the properties.
- Select a base image to be editted. Image need to have 'RGBA' color mode. (a)
- Select a mask image to specify the area to edit. Image need to have 'RGBA' color mode. (b)
- Enter a prompt to describe the edit. (c)
- Click the [▶] button. (d)
- The generated image appears in the [Generated Images] sub-panel. (e)
Note: The generated image will be saved in
<addon_folder>/_data/image/genereated
with file nameedit-<Base Image Name>.png
.
Properties | |
---|---|
Size | The size of the images to generate. |
Num | The number of images to generate. |
- Go to Image Editor.
- Select the tool [OpenAI Image Tool]. (a)
- Press the 'SPACE' key in the Image Editor, and the pop-up dialog appears. (b)
- Change the properties.
- Select a base image to be editted. Image need to have 'RGBA' color mode. (c)
- Select a mask image to specify the area to edit. Image need to have 'RGBA' color mode. (d)
- Enter a prompt. (e)
- Click the [OK] button. (f)
- The generated image appears in the [Generated Image] sub-panel.
Note: The generated image will be saved in
<addon_folder>/_data/image/genereated
with file nameedit-<Base Image Name>.png
.
Properties | |
---|---|
Size | The size of the images to generate. |
Num | The number of images to generate. |
- Go to Image Editor.
- Open [OpenAI] tab on Sidebar.
- Open a [Generate Variation Image] sub-panel.
- Change the properties.
- Select a base image used for generating the variation image. Image need to have 'RGBA' color mode. (a)
- Click the [▶] button. (b)
- The generated image appears in the [Generated Images] sub-panel. (c)
Note: The generated image will be saved in
<addon_folder>/_data/image/genereated
with file namevariation-<Base Image Name>.png
.
Audio Tool can transcribe an audio data.
Audio Tool can be accessed from [OpenAI] tab on the Sidebar Panel in Sequence
Editor/Text Editor or from the tool [OpenAI Audio Tool] in Sequence Editor.
There are 2 ways to transcribe a sound strip.
- Go to the Sequence Editor.
- Open [OpenAI] tab on Sidebar.
- Open a [Transcribe Sound Strip] sub-panel.
- Change the properties.
- Select the sound strip to be transcribed. If you check [Selected Sound Strip], an active sound strip is transcribed. (a)
- Click the [▶] button. (b)
- The text strip with the transcription text is created on the channel.
Properties | |
---|---|
Prompt | Optional text to specify the style. |
Language | Language of the input audio. |
Temperature | Higher value makes the output more random. Lower value makes the output more deterministic. |
Result | Sequence channel where the transcription result to be created. If [Auto] is checked, the channel is selected automatically. |
- Go to the Sequence Editor.
- Select the tool [OpenAI Audio Tool]. (a)
- Select the sound strip to be transcribed. (b)
- Press the 'SPACE' key in the Sequence Editor, and the pop-up dialog appears. (c)
- Change the properties.
- Click the [OK] button. (d)
- The text strip with the transcription text is created on the channel.
Properties | |
---|---|
Prompt | Optional text to specify the style. |
Language | Language of the input audio. |
Temperature | Higher value makes the output more random. Lower value makes the output more deterministic. |
Result | Sequence channel where the transcription result to be created. If [Auto] is checked, the channel is selected automatically. |
Editor | Text Editor |
Audio Tool can transcribe an audio data.
There are 2 ways to transcribe an audio data.
- Go to the Text Editor.
- Open [OpenAI] tab on Sidebar.
- Open a [Transcribe Audio] sub-panel.
- Change the properties.
- Select the transcript object from [Audio File].
- Select an audio file to be transcribed.
- Click the [▶] button.
- The transcription text appears in the Text Editor.
Properties | |
---|---|
Prompt | Optional text to specify the style. |
Language | Language of the input audio. |
Temperature | Higher value makes the output more random. Lower value makes the output more deterministic. |
Result | Name of target text block to where the transcript is saved. If [Current Text] is checked, the transcription text appears in the current text. |
- Go to the Text Editor.
- Open [OpenAI] tab on Sidebar.
- Open [Audio Tool] panel.
- Open [Transcribe Audio] sub-panel.
- Select [Sound Data Block].
- Change the properties.
- Select a sound data block to be transcribed. (a)
- Click the [▶] button. (b)
- The transcription text appears in the Text Editor.
Properties | |
---|---|
Prompt | Optional text to specify the style. |
Language | Language of the input audio. |
Temperature | Higher value makes the output more random. Lower value makes the output more deterministic. |
Result | Name of target text block to where the transcript is saved. If [Current Text] is checked, the transcription text appears in the current text. |
Chat Tool allows you to chat about Blender or ask about operators/properties.
Editor | 3D Viewport |
Chat Tool can be accessed from [OpenAI] tab on the Sidebar or from the tool
[OpenAI Chat Tool] in 3D Viewport.
There are 2 ways to chat.
- Go to the 3D Viewport.
- Open the [OpenAI] tab on sidebar.
- Open [Chat Tool] panel.
- Select [Topic] (if [New Topic] is not checked) or input a new topic name (if [New Topic] is checked). If you choose an existing topic, you can continue chatting by using old conversations. (a)
- Open the [Prompt] sub-panel.
- Input a prompt and conditions (optional). (b)
- Click the [▶] button. (c)
- The response appears in the [Log] sub-panel. (d)
You can copy a chat log to the clipboard or to the text block. (e)
If the response contains Python code, you can execute it. (f)
You can also check the error message if the code fails to execute.
- Go to the 3D Viewport.
- Select the tool [OpenAI Chat Tool]. (a)
- Set [Number of Conditions] in the tool setting if you want to add additional conditions (optional).
- Press the 'SPACE' key in the 3D Viewport, and the pop-up dialog appears. (b)
- Select [Topic] (if [New Topic] is not checked) or input a new topic name (if [New Topic] is checked). If you choose an existing topic, you can continue to chat by using old conversations. (c)
- Enter a prompt and conditions (optional). (d)
- Click the [OK] button. (e)
- The response appears in the [Log] sub-panel.
You can copy a chat log to the clipboard or to text.
If the response contains Python code, you can execute it directly.
You can also check the error message if the code fails to execute.
Editor | All |
Chat Tool supports asking Blender operators/properties from right-click menu.
- Move the mouse cursor to menu/panel items.
- Right-click and the menu appears. (a)
- When the mouse cursor is over the operator/property, you can execute [Ask]. (b)
- When executed, the new topic is automatically started.
- The response appears in the [Log] sub-panel. (c)
Code Tool allows you to generate a Python code with Blender Python API.
Editor | Text Editor |
Code tool can generate a Python code and display in the Text Editor.
- Go to the Text Editor.
- Open the [OpenAI] tab on sidebar.
- Open [Code Tool] panel.
- Open [Genereate Code] sub-panel.
- Input a prompt and conditions (optional). (a)
- Click the [▶] button. (b)
- Generated code can be listed on the text block.
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel. (c)(d)
You can also check the error message if the code fails to execute.
Editor | Text Editor |
Code tool can edit a Python code on the text block.
- Go to the Text Editor
- Open the [OpenAI] tab on sidebar.
- Open [Code Tool] panel.
- Open [Edit Code] sub-panel.
- Select the text block whose code to be editted. (a)
- Input a prompt and conditions (optional). (b)
- Click the [▶] button. (c)
- Generated code can be displayed to a new text block with the name
edit-<original_text_block>
.
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel. (d)(e)
You can also check the error message if the code fails to execute.
Editor | All |
Code Tool supports generating the code example that uses Blender Python API of operators/properties from right-click menu.
- Move the mouse cursor to menu/panel items.
- Right-click and the menu appears.
- When the mouse cursor is over the operator/property, you can execute [Generate Code Example]. (b)
- When executed, the generated code can be displayed to a new text block with
the name
[Example] <python_api>
.
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel.
You can also check the error message if the code fails to execute.
Code Tool can execute the genereated code from the prompt or audio input.
There are 4 ways to do this.
Editor | 3D Viewport |
- Go to the 3D Viewport.
- Open the [OpenAI] tab on sidebar.
- Open [Code Tool] panel.
- Open [Prompt] sub-panel.
- Input a prompt and conditions (optional). (a)
- Click the [▶] button. (b)
- Generated code is executed. (c)
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel. (d)(e)
You can also check the error message if the code fails to execute.
Editor | 3D Viewport |
- Go to the 3D Viewport.
- Open the [OpenAI] tab on sidebar.
- Open [Code Tool] panel.
- Input a conditions (optional).
- Click the [●] button. (a)
- Speak to the microphone what code you want to execute. Press 'ESC' key to cancel. (b)
- Generated code is executed. (c)
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel.
You can also check the error message if the code fails to execute.
Editor | 3D Viewport |
- Go to the 3D Viewport.
- Select the tool [OpenAI Code Tool]. (a)
- Set [Number of Conditions] in the tool setting if you want to add additional conditions (optional).
- Press the 'SPACE' key in the 3D Viewport, and the pop-up dialog appears. (b)
- Enter a prompt and conditions (optional). (e)
- Click the [OK] button. (d)
- Generated code is executed.
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel on [Code Tool] panel.
You can also check the error message if the code fails to execute.
Editor | 3D Viewport |
- Go to the 3D Viewport.
- Select the tool [OpenAI Code Tool]. (a)
- Set [Number of Conditions] in the tool setting if you want to add additional conditions (optional).
- Press 'Shift' + 'A' key in the 3D Viewport. (b)
- Speak to the microphone what code you want to execute. Press 'ESC' key to cancel. (c)
- Generated code is executed. (d)
You can execute the generated code or copy it to the text block from
[Genereated Code] sub-panel on [Code Tool] panel.
You can also check the error message if the code fails to execute.