blender-python-addon
Installation
SKILL.md
Blender Python Add-on Development
This skill covers building Blender add-ons with the bpy API, including add-on structure, operators, panels, properties, safe scene manipulation, and testing across Blender versions.
Workflow for Building a Blender Add-on
- Scaffold the add-on — Create a package with
__init__.pyas the entry point, and ablender_manifest.toml(Blender 4.2+ extensions) orbl_infodict (legacy add-ons) describing name, version, and supported Blender version. - Define data — Create
PropertyGroupclasses for grouped settings and register them on the appropriate ID type (e.g.,bpy.types.Scene.my_addon = PointerProperty(type=MyAddonSettings)). - Implement operators — Subclass
bpy.types.Operatorfor each user action; implementpoll()for availability,invoke()for interactive setup, andexecute()for the actual work. - Build UI panels — Subclass
bpy.types.Panelto expose operators and properties in the appropriate editor (3D viewport sidebar, properties editor, etc.). - Register everything — List all classes in a
classestuple and register/unregister them in matchingregister()/unregister()functions; register property pointers alongside their classes. - Test in a clean profile — Launch Blender with
--factory-startup, install the add-on, enable it, exercise each operator, then disable it and confirm nothing is left behind. - Package and ship — Zip the add-on folder (or build a
.zipextension package) and verify it installs cleanly via Blender's Preferences > Add-ons (or Extensions) panel.