blender-syntax-operators

Enforce correct syntax, lifecycle, and context handling for Blender Python operators.

30|4|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill blender-syntax-operators-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: blender-syntax-operators
Source: https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/syntax/blender-syntax-operators
Command: npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill blender-syntax-operators-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents common Blender Python operator failures caused by incorrect lifecycle methods, invalid bl_idname naming, missing poll(), wrong return types, and outdated context override patterns—issues that can lead to silent malfunction or hard crashes.

Core Features & Use Cases

  • Correct operator lifecycle implementation: Ensures execute(), invoke(), and modal() return the required set values and supports dialogs, confirmations, and modal event loops safely.
  • Robust registration guardrails: Enforces proper poll() definition as a @classmethod and correct bl_idname formatting (lowercase category + dot + snake_case name) to avoid registration-time errors.
  • Blender 4.0+ context override correctness: Guides use of context.temp_override() instead of removed dict-based overrides, especially for operator calls that depend on context (active object, selected objects, VIEW_3D areas).
  • Operator usage patterns and anti-pattern prevention: Provides decision trees and best-practice snippets so you can generate operators that behave predictably and remain undoable where appropriate.

Quick Start

Ask Claude to generate a custom Blender operator class that includes a valid lowercase bl_idname, a @classmethod poll() guard, correct bl_options for undoable scene edits, and a context-safe call pattern using context.temp_override() for Blender 4.0+.

Frequently Asked Questions about blender-syntax-operators

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Blender Python operator fail to register with an invalid bl_idname error?

Blender requires the bl_idname to follow a strict lowercase category + dot + snake_case name format. Using uppercase letters or incorrect separators causes registration-time failures that prevent the operator from loading.

How do I use context override for bpy.ops calls in Blender 4.0+?

Blender 4.0+ removed dict-based context overrides and requires using bpy.context.temp_override() to pass active objects or VIEW_3D areas when invoking bpy.ops from scripts. This ensures operators execute with the correct context safely.

What return values are required for execute and modal methods in Blender operators?

Blender operator execute() and modal() methods must return a set containing specific values like {'FINISHED'} or {'CANCELLED'}. Returning incorrect types causes silent malfunctions or hard crashes during execution.

How do I define a poll classmethod for a custom bpy.types.Operator?

The poll() method must be defined as a @classmethod and should return a boolean to check if the operator can run in the current context. Missing or incorrectly defined poll methods lead to operator registration and execution errors.

Does this Blender operator syntax guide work across Blender 3.x to 5.x?

The syntax and lifecycle rules apply to creating custom operators across Blender 3.x to 5.x. It specifically guides correct context handling transitions, enforcing temp_override() usage for Blender 4.0+ while maintaining compatibility.

What bl_options flags should I use for an undoable scene edit operator?

Appropriate bl_options flags like {'REGISTER', 'UNDO'} must be set to ensure the operator behaves predictably and remains undoable. Correct flags prevent unexpected state changes during scene modifications.