filmov
tv
How to Make a Blender Extension [ + use Python to control 3D objects, write files, automate renders]

Показать описание
Timestamps:
0:00 What are Blender Extensions/Add-ons?
0:21 Boilerplate Code Part 1
0:55 How the example extension interacts with Blender
3:45 Boilerplate Code Part 2
---
Ok, let's make a Blender extension.
Extensions (add-ons in earlier versions) are undergoing some changes where you can get "Extensions" through official channels and you can install "Add-ons" locally. They're written in Python and make extensive use of the 'bpy' library to move information and instructions between your Python code and the Blender instance.
A quirk to note, the highlighted triple quote string (Python 'docstring') will define the tooltip that appears when hovering over the menu item that activates your extension.
Now we define what happens when the user executes the extension. In this case, we first defines a number of parameters, including the export directory, what exports formats will be generated, how files will be named, and what display modes will be captured as images.
When the work is done, it's time to clean up. If there was an original camera that is restored and the temporary camera is removed. Success is also noted in the console.
Returning to the last of the boilerplate, the file ends with the functions that add the extension to the Blender menu, in this case under File -- Export, and the text here defines what the menu item will say.
To install an add-on you've written or downloaded outside of the official Extensions ecosystem, you can select Edit -- Preferences -- Add-ons -- drop-down at the upper right -- Install from Disk. Navigate to your file, select it, and click the 'Install from Disk' button. Your freshly installed extension will generally be ready for immediate use.
---
BTC: 3PVeqcvKoQqKRgGDhHvZJ49AumUhnVSqC9
ETH: 0xe74a8e8e76380d3E2048e25Bd927b7880E608Ac8
0:00 What are Blender Extensions/Add-ons?
0:21 Boilerplate Code Part 1
0:55 How the example extension interacts with Blender
3:45 Boilerplate Code Part 2
---
Ok, let's make a Blender extension.
Extensions (add-ons in earlier versions) are undergoing some changes where you can get "Extensions" through official channels and you can install "Add-ons" locally. They're written in Python and make extensive use of the 'bpy' library to move information and instructions between your Python code and the Blender instance.
A quirk to note, the highlighted triple quote string (Python 'docstring') will define the tooltip that appears when hovering over the menu item that activates your extension.
Now we define what happens when the user executes the extension. In this case, we first defines a number of parameters, including the export directory, what exports formats will be generated, how files will be named, and what display modes will be captured as images.
When the work is done, it's time to clean up. If there was an original camera that is restored and the temporary camera is removed. Success is also noted in the console.
Returning to the last of the boilerplate, the file ends with the functions that add the extension to the Blender menu, in this case under File -- Export, and the text here defines what the menu item will say.
To install an add-on you've written or downloaded outside of the official Extensions ecosystem, you can select Edit -- Preferences -- Add-ons -- drop-down at the upper right -- Install from Disk. Navigate to your file, select it, and click the 'Install from Disk' button. Your freshly installed extension will generally be ready for immediate use.
---
BTC: 3PVeqcvKoQqKRgGDhHvZJ49AumUhnVSqC9
ETH: 0xe74a8e8e76380d3E2048e25Bd927b7880E608Ac8