← ClaudeAtlas

operatorslisted

Author Blender operators with bpy.types.Operator, bl_idname conventions, the poll/invoke/execute/modal lifecycle, REGISTER and UNDO options, and defensive context handling. Targets 5.2 LTS with 4.5 LTS compatibility.
TMHSDigital/Blender-Developer-Tools · ★ 13 · API & Backend · score 66
Install: claude install-skill TMHSDigital/Blender-Developer-Tools
# Operators ## Trigger Use this skill when the user: - Wants to create a new `bpy.types.Operator` - Mentions `bl_idname`, `bl_label`, `bl_options`, "redo panel", "F6 panel", "operator props" - Needs an action triggered from a button, menu, keymap, or chat command - Asks why their operator's properties don't show up in the redo panel ## Required inputs - **Action category**: the prefix of `bl_idname` (`mesh`, `object`, `scene`, `view3d`, etc.) - **Operator name**: the suffix (`my_addon_action`) - **Class name**: the conventional `CATEGORY_OT_name` (`MESH_OT_my_addon_action`) - **Whether the action is undoable** (most are) ## Anatomy of a Blender operator ```python import bpy class MESH_OT_extrude_normal(bpy.types.Operator): bl_idname = "mesh.extrude_normal" bl_label = "Extrude Along Normal" bl_description = "Extrude active mesh by a fixed amount along its normal" bl_options = {'REGISTER', 'UNDO'} distance: bpy.props.FloatProperty( name="Distance", description="How far to extrude", default=0.5, min=-100.0, max=100.0, unit='LENGTH', ) @classmethod def poll(cls, context): obj = context.active_object return obj is not None and obj.type == 'MESH' and obj.mode == 'OBJECT' def execute(self, context): obj = context.active_object if obj is None: self.report({'ERROR'}, "No active object") return {'CANCELLED'} # Operate on bpy.da