blender-add-on-development
by @seekerzero
Develop, debug, and upgrade Blender add-ons/plugins and `bpy` scripts with Blender 4.x and 5.x compatibility. Use when tasks involve generating new add-on co...
clawhub install blender-plugin-devπ About This Skill
name: blender-plugin-development description: Develop, debug, and upgrade Blender add-ons/plugins and
bpy scripts with Blender 4.x and 5.x compatibility. Use when tasks involve generating new add-on code, scaffolding operators/panels, migrating deprecated Python API calls, resolving Blender version breakages, or validating scripts against Blender 4/5 API changes.
Blender Plugin Development
Quick Start
1. Confirm target Blender versions (minimum and maximum expected).
2. Read references/blender4_to_5_compat.md before writing or patching code.
3. Scaffold a new add-on package with scripts/scaffold_addon.py when requested.
4. Implement requested behavior with explicit compatibility guards for 4.x and 5.x.
5. Validate syntax and registration flow before returning code.
Workflow
1) Scope the task
>= 4.0 with 5.x awareness.bpy script.
- A migration patch to existing code.2) Generate a baseline when creating a new add-on
python3 scripts/scaffold_addon.py --name "" --output
__init__.py, operators.py, ui.py, and compat.py for the feature request.bl_info["blender"] at the minimum supported version (for this skill, usually (4, 0, 0) or higher).3) Implement compatibility-safe code
bpy.app.version gates only when behavior truly diverges.compat.py over scattered version checks.references/blender4_to_5_compat.md.context.temp_override(...).context.asset and AssetRepresentation.bgl and migrate to gpu.4) Validate before returning code
python3 -m py_compile on changed Python files.blender --background --factory-startup --python
bl_idname format.Script Generation Patterns
operators.py for operators.
- ui.py for panels/menus.
- compat.py for version shims.
- __init__.py for bl_info and registration entrypoints.
self.report({"ERROR"}, "...") inside operators.poll() and execute().Required Compatibility Rules
bl_ui_utils, rna_info).scene.use_nodes as deprecated and avoid using it for new code.UILayout.template_asset_view() in new code; use asset-shelf-compatible APIs.Resources (optional)
scripts/
scripts/scaffold_addon.py: Generate a Blender 4/5-ready add-on package skeleton.references/
references/blender4_to_5_compat.md: Blender 4.0 and 5.0 compatibility map with official sources.references/script_generation_patterns.md: Reusable patterns for operators, panels, and background scripts.π‘ Examples
1. Confirm target Blender versions (minimum and maximum expected).
2. Read references/blender4_to_5_compat.md before writing or patching code.
3. Scaffold a new add-on package with scripts/scaffold_addon.py when requested.
4. Implement requested behavior with explicit compatibility guards for 4.x and 5.x.
5. Validate syntax and registration flow before returning code.