[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FA4T1ZGSJTGKWNE0HR9DQC":3,"skill-same:01M7FA4T1ZGSJTGKWNE0HR9DQC":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7FA4T1ZGSJTGKWNE0HR9DQC","blender-syntax-operators",null,"Use when creating custom Blender operators -- bpy.types.Operator subclasses with execute, invoke, or modal methods. Prevents the common mistake of not implementing poll() (causing silent failures) or using wrong bl_idname format. Covers operator lifecycle, bl_options, return values, properties, and context.temp_override (4.0+ replacement for context override). Keywords: Operator, execute, invoke, modal, poll, bl_idname, bl_options, temp_override, REGISTER, UNDO, operator properties, bpy.ops, create custom operator, add button, operator CANCELLED.","lagzgabrielmuller-dot\u002Fkit-ingenieria-3d","lagzgabrielmuller-dot","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F333339260?v=4","01M7F985KYC0XB2XZ97B5YWH4C","01M7F985MHK8N2NVE4VAR5WBWS",0,"MIT","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-operators\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: blender-syntax-operators\ndescription: >\n  Use when creating custom Blender operators -- bpy.types.Operator subclasses with execute,\n  invoke, or modal methods. Prevents the common mistake of not implementing poll() (causing\n  silent failures) or using wrong bl_idname format. Covers operator lifecycle, bl_options,\n  return values, properties, and context.temp_override (4.0+ replacement for context override).\n  Keywords: Operator, execute, invoke, modal, poll, bl_idname, bl_options, temp_override, REGISTER, UNDO, operator properties, bpy.ops, create custom operator, add button, operator CANCELLED.\nlicense: MIT\ncompatibility: \"Designed for Claude Code. Requires Blender 3.x\u002F4.x\u002F5.x with Python.\"\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# blender-syntax-operators\n\n## Quick Reference\n\n### Critical Warnings\n\n**ALWAYS** return a `set` from `execute()`, `invoke()`, and `modal()` — e.g., `{'FINISHED'}`, `{'CANCELLED'}`, `{'RUNNING_MODAL'}`. Returning a plain string or `None` crashes Blender.\n\n**ALWAYS** use `context.temp_override()` in Blender 4.0+. Dict-based context overrides (`bpy.ops.foo(override_dict, ...)`) were REMOVED in 4.0.\n\n**ALWAYS** set `bl_options = {'REGISTER', 'UNDO'}` for operators that modify scene data. Omitting `'UNDO'` means users cannot Ctrl+Z the operation.\n\n**ALWAYS** implement `poll()` as a `@classmethod`. Forgetting `@classmethod` causes a `TypeError` at registration.\n\n**NEVER** call `bpy.ops.*` inside `Panel.draw()` — draw callbacks are read-only. Use operator buttons via `layout.operator()` instead.\n\n**NEVER** use uppercase letters in the category part of `bl_idname`. The format is `\"category.operator_name\"` — both parts MUST be lowercase with underscores.\n\n**NEVER** store mutable state as class-level attributes on operators expecting per-instance behavior. Use `self` instance attributes set in `invoke()` or `execute()`, or use operator properties.\n\n### Operator Decision Tree\n\n```\nNeed to create a Blender operation?\n│\n├─ Runs once, no user interaction needed?\n│  └─ Implement execute() only\n│     └─ Set invoke = execute (optional shorthand)\n│\n├─ Needs a dialog\u002Fpopup before running?\n│  └─ Implement invoke() → wm.invoke_props_dialog(self)\n│     └─ Implement draw() for dialog layout\n│     └─ Implement execute() for the actual work\n│\n├─ Needs continuous event handling (drag, timer, mouse)?\n│  └─ Implement invoke() → wm.modal_handler_add(self) + return {'RUNNING_MODAL'}\n│     └─ Implement modal() for event processing\n│     └─ Implement cancel() for cleanup\n│\n└─ Needs confirmation popup?\n   └─ Implement invoke() → wm.invoke_confirm(self, event)\n      └─ Implement execute() for the confirmed action\n```\n\n### Version Compatibility Matrix\n\n| Feature | Blender 3.x | Blender 4.0+ | Blender 4.2+ |\n|---------|-------------|--------------|--------------|\n| Context override dict | `bpy.ops.foo(override, ...)` | REMOVED | REMOVED |\n| `context.temp_override()` | Available from 3.2 | REQUIRED | REQUIRED |\n| `'MODAL_PRIORITY'` bl_option | Not available | Not available | Available |\n| `bl_idname` format | `\"CAT.name\"` or `\"cat.name\"` | `\"cat.name\"` (lowercase enforced) | `\"cat.name\"` |\n| Extension manifest | `bl_info` dict | `bl_info` or `blender_manifest.toml` | `blender_manifest.toml` preferred |\n\n---\n\n## Essential Patterns\n\n### Pattern 1: Minimal Operator (execute only)\n\n```python\nimport bpy\n\nclass MYCAT_OT_simple_action(bpy.types.Operator):\n    \"\"\"Tooltip for the operator\"\"\"\n    bl_idname = \"mycat.simple_action\"\n    bl_label = \"Simple Action\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    @classmethod\n    def poll(cls, context):\n        return context.active_object is not None\n\n    def execute(self, context):\n        context.active_object.location.z += 1.0\n        self.report({'INFO'}, \"Moved object up\")\n        return {'FINISHED'}\n\ndef register():\n    bpy.utils.register_class(MYCAT_OT_simple_action)\n\ndef unregister():\n    bpy.utils.unregister_class(MYCAT_OT_simple_action)\n```\n\n### Pattern 2: Operator with Properties\n\n```python\nclass MYCAT_OT_scale_object(bpy.types.Operator):\n    \"\"\"Scale the active object by a specified factor\"\"\"\n    bl_idname = \"mycat.scale_object\"\n    bl_label = \"Scale Object\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    # Operator properties — shown in F9 redo panel and invoke dialogs\n    factor: bpy.props.FloatProperty(\n        name=\"Scale Factor\",\n        default=2.0,\n        min=0.01,\n        max=100.0,\n        description=\"Factor to scale the object by\",\n    )\n    uniform: bpy.props.BoolProperty(\n        name=\"Uniform\",\n        default=True,\n        description=\"Scale uniformly on all axes\",\n    )\n    axis: bpy.props.EnumProperty(\n        name=\"Axis\",\n        items=[\n            ('X', \"X\", \"Scale on X axis only\"),\n            ('Y', \"Y\", \"Scale on Y axis only\"),\n            ('Z', \"Z\", \"Scale on Z axis only\"),\n        ],\n        default='X',\n    )\n\n    @classmethod\n    def poll(cls, context):\n        return context.active_object is not None\n\n    def execute(self, context):\n        obj = context.active_object\n        if self.uniform:\n            obj.scale *= self.factor\n        else:\n            setattr(obj.scale, self.axis.lower(),\n                    getattr(obj.scale, self.axis.lower()) * self.factor)\n        return {'FINISHED'}\n```\n\n### Pattern 3: Invoke with Props Dialog\n\n```python\nclass MYCAT_OT_create_grid(bpy.types.Operator):\n    \"\"\"Create a grid of objects with user-specified parameters\"\"\"\n    bl_idname = \"mycat.create_grid\"\n    bl_label = \"Create Grid\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    count_x: bpy.props.IntProperty(name=\"Count X\", default=3, min=1, max=50)\n    count_y: bpy.props.IntProperty(name=\"Count Y\", default=3, min=1, max=50)\n    spacing: bpy.props.FloatProperty(name=\"Spacing\", default=2.0, min=0.1)\n\n    def invoke(self, context, event):\n        # Shows a dialog with the properties; execute() runs on OK\n        return context.window_manager.invoke_props_dialog(self)\n\n    def draw(self, context):\n        layout = self.layout\n        layout.prop(self, \"count_x\")\n        layout.prop(self, \"count_y\")\n        layout.prop(self, \"spacing\")\n\n    def execute(self, context):\n        for x in range(self.count_x):\n            for y in range(self.count_y):\n                bpy.ops.mesh.primitive_cube_add(\n                    location=(x * self.spacing, y * self.spacing, 0)\n                )\n        self.report({'INFO'}, f\"Created {self.count_x * self.count_y} objects\")\n        return {'FINISHED'}\n```\n\n### Pattern 4: Modal Operator\n\n```python\nclass MYCAT_OT_modal_draw(bpy.types.Operator):\n    \"\"\"Interactive modal operator with timer\"\"\"\n    bl_idname = \"mycat.modal_draw\"\n    bl_label = \"Modal Draw\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    _timer = None\n\n    def modal(self, context, event):\n        if event.type in {'RIGHTMOUSE', 'ESC'}:\n            self.cancel(context)\n            return {'CANCELLED'}\n\n        if event.type == 'TIMER':\n            # Periodic update logic here\n            pass\n\n        if event.type == 'LEFTMOUSE' and event.value == 'PRESS':\n            # Finish on left click\n            self.cancel(context)\n            return {'FINISHED'}\n\n        return {'PASS_THROUGH'}\n\n    def invoke(self, context, event):\n        self._timer = context.window_manager.event_timer_add(\n            0.1, window=context.window\n        )\n        context.window_manager.modal_handler_add(self)\n        return {'RUNNING_MODAL'}\n\n    def cancel(self, context):\n        if self._timer is not None:\n            context.window_manager.event_timer_remove(self._timer)\n            self._timer = None\n```\n\n### Pattern 5: Context Override (4.0+ required)\n\n```python\n# Override active object for operator execution\nwith bpy.context.temp_override(active_object=obj, selected_objects=[obj]):\n    bpy.ops.object.shade_smooth()\n\n# Override area type for viewport operators\ndef run_in_viewport(operator_call):\n    \"\"\"Execute an operator that requires a VIEW_3D area context.\"\"\"\n    for window in bpy.context.window_manager.windows:\n        for area in window.screen.areas:\n            if area.type == 'VIEW_3D':\n                with bpy.context.temp_override(window=window, area=area):\n                    return operator_call()\n    raise RuntimeError(\"No VIEW_3D area found\")\n\n# Usage:\nrun_in_viewport(lambda: bpy.ops.view3d.snap_cursor_to_center())\n```\n\n### Pattern 6: Confirmation Dialog\n\n```python\nclass MYCAT_OT_delete_all(bpy.types.Operator):\n    \"\"\"Delete all objects with confirmation\"\"\"\n    bl_idname = \"mycat.delete_all\"\n    bl_label = \"Delete All Objects\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    @classmethod\n    def poll(cls, context):\n        return len(bpy.data.objects) > 0\n\n    def invoke(self, context, event):\n        return context.window_manager.invoke_confirm(self, event)\n\n    def execute(self, context):\n        for obj in bpy.data.objects:\n            bpy.data.objects.remove(obj)\n        self.report({'WARNING'}, \"All objects deleted\")\n        return {'FINISHED'}\n```\n\n---\n\n## Common Operations\n\n### Calling Operators from Scripts\n\n```python\n# Direct call: uses current context\nbpy.ops.mesh.primitive_cube_add(size=2.0, location=(0, 0, 1))\n\n# With context override (Blender 4.0+)\nwith bpy.context.temp_override(active_object=obj):\n    bpy.ops.object.modifier_apply(modifier=\"Boolean\")\n\n# Check if operator can run before calling\nif bpy.ops.object.mode_set.poll():\n    bpy.ops.object.mode_set(mode='EDIT')\n```\n\n### Registration and Menus\n\n```python\n# Register operator and add to menu\ndef menu_func(self, context):\n    self.layout.operator(MYCAT_OT_simple_action.bl_idname)\n\ndef register():\n    bpy.utils.register_class(MYCAT_OT_simple_action)\n    bpy.types.VIEW3D_MT_object.append(menu_func)\n\ndef unregister():\n    bpy.types.VIEW3D_MT_object.remove(menu_func)\n    bpy.utils.unregister_class(MYCAT_OT_simple_action)\n```\n\n### Operator Reporting\n\n```python\n# Report types: 'DEBUG', 'INFO', 'OPERATOR', 'WARNING', 'ERROR', 'ERROR_INVALID_INPUT'\nself.report({'INFO'}, \"Operation completed\")\nself.report({'WARNING'}, \"Check the result\")\nself.report({'ERROR'}, \"Something went wrong\")  # Shows in status bar, does NOT raise\n```\n\n### bl_idname Naming Convention\n\n```\nCLASS_OT_operator_name\n│      │   │\n│      │   └─ snake_case descriptive name\n│      └───── OT = Operator Type (ALWAYS \"OT\" for operators)\n└──────────── UPPERCASE category prefix (matches addon\u002Fmodule)\n```\n\nThe `bl_idname` string format: `\"category.operator_name\"` — both parts lowercase.\nThe class name format: `CATEGORY_OT_operator_name` — category uppercase, rest snake_case.\n\n```python\n# CORRECT:\nclass MESH_OT_add_custom(bpy.types.Operator):\n    bl_idname = \"mesh.add_custom\"        # lowercase.lowercase\n\n# WRONG: bl_idname has uppercase:\nclass MESH_OT_add_custom(bpy.types.Operator):\n    bl_idname = \"Mesh.AddCustom\"         # WILL FAIL at registration\n```\n\n### bl_options Reference\n\n| Flag | Use When |\n|------|----------|\n| `'REGISTER'` | ALWAYS — makes operator visible in info log and F3 search |\n| `'UNDO'` | Operator modifies scene data (objects, meshes, materials) |\n| `'UNDO_GROUPED'` | Multiple rapid calls should be one undo step (e.g., timer-based updates) |\n| `'BLOCKING'` | Modal operator should block ALL other event handlers |\n| `'GRAB_CURSOR'` | Modal with mouse movement should wrap cursor at screen edges |\n| `'GRAB_CURSOR_X'` | Wrap cursor on X axis only |\n| `'GRAB_CURSOR_Y'` | Wrap cursor on Y axis only |\n| `'INTERNAL'` | Operator should NOT appear in F3 search menu |\n| `'PRESET'` | Show preset selector in operator properties panel |\n| `'MACRO'` | Operator is a macro containing sub-operators |\n| `'MODAL_PRIORITY'` | (4.2+) Receive events before other modal operators |\n\n### Return Values\n\n| Value | When to Use |\n|-------|------------|\n| `{'FINISHED'}` | Operator completed successfully |\n| `{'CANCELLED'}` | Operator was cancelled, no changes made |\n| `{'RUNNING_MODAL'}` | Operator is entering modal mode (from `invoke()`) |\n| `{'PASS_THROUGH'}` | Modal: allow other operators to also handle this event |\n| `{'INTERFACE'}` | Operator handled event but did not execute (popup shown) |\n\n---\n\n## Operator Method Signatures\n\n```python\nclass bpy.types.Operator:\n    bl_idname: str          # \"category.name\" — REQUIRED\n    bl_label: str           # Display name — REQUIRED\n    bl_description: str     # Tooltip (overrides docstring)\n    bl_options: set[str]    # {'REGISTER', 'UNDO', ...}\n    bl_translation_context: str  # i18n context\n    bl_undo_group: str      # Group name for undo grouping\n\n    @classmethod\n    def poll(cls, context) -> bool: ...\n\n    def execute(self, context) -> set[str]: ...\n    def invoke(self, context, event) -> set[str]: ...\n    def modal(self, context, event) -> set[str]: ...\n    def draw(self, context) -> None: ...\n    def cancel(self, context) -> None: ...\n\n    def report(self, type: set[str], message: str) -> None: ...\n\n    # Access layout for draw()\n    layout: bpy.types.UILayout  # Available in draw()\n```\n\n### Event Object (used in invoke\u002Fmodal)\n\n```python\nevent.type      # str: 'LEFTMOUSE', 'RIGHTMOUSE', 'ESC', 'TIMER', 'A', 'B', etc.\nevent.value     # str: 'PRESS', 'RELEASE', 'CLICK', 'DOUBLE_CLICK', 'NOTHING'\nevent.mouse_x   # int: absolute mouse X position\nevent.mouse_y   # int: absolute mouse Y position\nevent.mouse_region_x  # int: mouse X relative to region\nevent.mouse_region_y  # int: mouse Y relative to region\nevent.shift     # bool: Shift held\nevent.ctrl      # bool: Ctrl held\nevent.alt       # bool: Alt held\nevent.oskey     # bool: OS\u002FSuper key held\n```\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Complete API signatures for Operator, WindowManager, Event, and registration functions\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Working code examples for all operator patterns\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — Common mistakes when writing operators, with fixes\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Operator.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.ops.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Event.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F4.0\u002Fpython_api\u002F\n\n### Related Skills\n\n- [blender-core-api](..\u002F..\u002Fcore\u002Fblender-core-api\u002FSKILL.md) — bpy module structure, context system, data access patterns\n","# blender-syntax-operators\n\n## Quick Reference\n\n### Critical Warnings\n\n**ALWAYS** return a `set` from `execute()`, `invoke()`, and `modal()` — e.g., `{'FINISHED'}`, `{'CANCELLED'}`, `{'RUNNING_MODAL'}`. Returning a plain string or `None` crashes Blender.\n\n**ALWAYS** use `context.temp_override()` in Blender 4.0+. Dict-based context overrides (`bpy.ops.foo(override_dict, ...)`) were REMOVED in 4.0.\n\n**ALWAYS** set `bl_options = {'REGISTER', 'UNDO'}` for operators that modify scene data. Omitting `'UNDO'` means users cannot Ctrl+Z the operation.\n\n**ALWAYS** implement `poll()` as a `@classmethod`. Forgetting `@classmethod` causes a `TypeError` at registration.\n\n**NEVER** call `bpy.ops.*` inside `Panel.draw()` — draw callbacks are read-only. Use operator buttons via `layout.operator()` instead.\n\n**NEVER** use uppercase letters in the category part of `bl_idname`. The format is `\"category.operator_name\"` — both parts MUST be lowercase with underscores.\n\n**NEVER** store mutable state as class-level attributes on operators expecting per-instance behavior. Use `self` instance attributes set in `invoke()` or `execute()`, or use operator properties.\n\n### Operator Decision Tree\n\n```\nNeed to create a Blender operation?\n│\n├─ Runs once, no user interaction needed?\n│  └─ Implement execute() only\n│     └─ Set invoke = execute (optional shorthand)\n│\n├─ Needs a dialog\u002Fpopup before running?\n│  └─ Implement invoke() → wm.invoke_props_dialog(self)\n│     └─ Implement draw() for dialog layout\n│     └─ Implement execute() for the actual work\n│\n├─ Needs continuous event handling (drag, timer, mouse)?\n│  └─ Implement invoke() → wm.modal_handler_add(self) + return {'RUNNING_MODAL'}\n│     └─ Implement modal() for event processing\n│     └─ Implement cancel() for cleanup\n│\n└─ Needs confirmation popup?\n   └─ Implement invoke() → wm.invoke_confirm(self, event)\n      └─ Implement execute() for the confirmed action\n```\n\n### Version Compatibility Matrix\n\n| Feature | Blender 3.x | Blender 4.0+ | Blender 4.2+ |\n|---------|-------------|--------------|--------------|\n| Context override dict | `bpy.ops.foo(override, ...)` | REMOVED | REMOVED |\n| `context.temp_override()` | Available from 3.2 | REQUIRED | REQUIRED |\n| `'MODAL_PRIORITY'` bl_option | Not available | Not available | Available |\n| `bl_idname` format | `\"CAT.name\"` or `\"cat.name\"` | `\"cat.name\"` (lowercase enforced) | `\"cat.name\"` |\n| Extension manifest | `bl_info` dict | `bl_info` or `blender_manifest.toml` | `blender_manifest.toml` preferred |\n\n---\n\n## Essential Patterns\n\n### Pattern 1: Minimal Operator (execute only)\n\n```python\nimport bpy\n\nclass MYCAT_OT_simple_action(bpy.types.Operator):\n    \"\"\"Tooltip for the operator\"\"\"\n    bl_idname = \"mycat.simple_action\"\n    bl_label = \"Simple Action\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    @classmethod\n    def poll(cls, context):\n        return context.active_object is not None\n\n    def execute(self, context):\n        context.active_object.location.z += 1.0\n        self.report({'INFO'}, \"Moved object up\")\n        return {'FINISHED'}\n\ndef register():\n    bpy.utils.register_class(MYCAT_OT_simple_action)\n\ndef unregister():\n    bpy.utils.unregister_class(MYCAT_OT_simple_action)\n```\n\n### Pattern 2: Operator with Properties\n\n```python\nclass MYCAT_OT_scale_object(bpy.types.Operator):\n    \"\"\"Scale the active object by a specified factor\"\"\"\n    bl_idname = \"mycat.scale_object\"\n    bl_label = \"Scale Object\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    # Operator properties — shown in F9 redo panel and invoke dialogs\n    factor: bpy.props.FloatProperty(\n        name=\"Scale Factor\",\n        default=2.0,\n        min=0.01,\n        max=100.0,\n        description=\"Factor to scale the object by\",\n    )\n    uniform: bpy.props.BoolProperty(\n        name=\"Uniform\",\n        default=True,\n        description=\"Scale uniformly on all axes\",\n    )\n    axis: bpy.props.EnumProperty(\n        name=\"Axis\",\n        items=[\n            ('X', \"X\", \"Scale on X axis only\"),\n            ('Y', \"Y\", \"Scale on Y axis only\"),\n            ('Z', \"Z\", \"Scale on Z axis only\"),\n        ],\n        default='X',\n    )\n\n    @classmethod\n    def poll(cls, context):\n        return context.active_object is not None\n\n    def execute(self, context):\n        obj = context.active_object\n        if self.uniform:\n            obj.scale *= self.factor\n        else:\n            setattr(obj.scale, self.axis.lower(),\n                    getattr(obj.scale, self.axis.lower()) * self.factor)\n        return {'FINISHED'}\n```\n\n### Pattern 3: Invoke with Props Dialog\n\n```python\nclass MYCAT_OT_create_grid(bpy.types.Operator):\n    \"\"\"Create a grid of objects with user-specified parameters\"\"\"\n    bl_idname = \"mycat.create_grid\"\n    bl_label = \"Create Grid\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    count_x: bpy.props.IntProperty(name=\"Count X\", default=3, min=1, max=50)\n    count_y: bpy.props.IntProperty(name=\"Count Y\", default=3, min=1, max=50)\n    spacing: bpy.props.FloatProperty(name=\"Spacing\", default=2.0, min=0.1)\n\n    def invoke(self, context, event):\n        # Shows a dialog with the properties; execute() runs on OK\n        return context.window_manager.invoke_props_dialog(self)\n\n    def draw(self, context):\n        layout = self.layout\n        layout.prop(self, \"count_x\")\n        layout.prop(self, \"count_y\")\n        layout.prop(self, \"spacing\")\n\n    def execute(self, context):\n        for x in range(self.count_x):\n            for y in range(self.count_y):\n                bpy.ops.mesh.primitive_cube_add(\n                    location=(x * self.spacing, y * self.spacing, 0)\n                )\n        self.report({'INFO'}, f\"Created {self.count_x * self.count_y} objects\")\n        return {'FINISHED'}\n```\n\n### Pattern 4: Modal Operator\n\n```python\nclass MYCAT_OT_modal_draw(bpy.types.Operator):\n    \"\"\"Interactive modal operator with timer\"\"\"\n    bl_idname = \"mycat.modal_draw\"\n    bl_label = \"Modal Draw\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    _timer = None\n\n    def modal(self, context, event):\n        if event.type in {'RIGHTMOUSE', 'ESC'}:\n            self.cancel(context)\n            return {'CANCELLED'}\n\n        if event.type == 'TIMER':\n            # Periodic update logic here\n            pass\n\n        if event.type == 'LEFTMOUSE' and event.value == 'PRESS':\n            # Finish on left click\n            self.cancel(context)\n            return {'FINISHED'}\n\n        return {'PASS_THROUGH'}\n\n    def invoke(self, context, event):\n        self._timer = context.window_manager.event_timer_add(\n            0.1, window=context.window\n        )\n        context.window_manager.modal_handler_add(self)\n        return {'RUNNING_MODAL'}\n\n    def cancel(self, context):\n        if self._timer is not None:\n            context.window_manager.event_timer_remove(self._timer)\n            self._timer = None\n```\n\n### Pattern 5: Context Override (4.0+ required)\n\n```python\n# Override active object for operator execution\nwith bpy.context.temp_override(active_object=obj, selected_objects=[obj]):\n    bpy.ops.object.shade_smooth()\n\n# Override area type for viewport operators\ndef run_in_viewport(operator_call):\n    \"\"\"Execute an operator that requires a VIEW_3D area context.\"\"\"\n    for window in bpy.context.window_manager.windows:\n        for area in window.screen.areas:\n            if area.type == 'VIEW_3D':\n                with bpy.context.temp_override(window=window, area=area):\n                    return operator_call()\n    raise RuntimeError(\"No VIEW_3D area found\")\n\n# Usage:\nrun_in_viewport(lambda: bpy.ops.view3d.snap_cursor_to_center())\n```\n\n### Pattern 6: Confirmation Dialog\n\n```python\nclass MYCAT_OT_delete_all(bpy.types.Operator):\n    \"\"\"Delete all objects with confirmation\"\"\"\n    bl_idname = \"mycat.delete_all\"\n    bl_label = \"Delete All Objects\"\n    bl_options = {'REGISTER', 'UNDO'}\n\n    @classmethod\n    def poll(cls, context):\n        return len(bpy.data.objects) > 0\n\n    def invoke(self, context, event):\n        return context.window_manager.invoke_confirm(self, event)\n\n    def execute(self, context):\n        for obj in bpy.data.objects:\n            bpy.data.objects.remove(obj)\n        self.report({'WARNING'}, \"All objects deleted\")\n        return {'FINISHED'}\n```\n\n---\n\n## Common Operations\n\n### Calling Operators from Scripts\n\n```python\n# Direct call: uses current context\nbpy.ops.mesh.primitive_cube_add(size=2.0, location=(0, 0, 1))\n\n# With context override (Blender 4.0+)\nwith bpy.context.temp_override(active_object=obj):\n    bpy.ops.object.modifier_apply(modifier=\"Boolean\")\n\n# Check if operator can run before calling\nif bpy.ops.object.mode_set.poll():\n    bpy.ops.object.mode_set(mode='EDIT')\n```\n\n### Registration and Menus\n\n```python\n# Register operator and add to menu\ndef menu_func(self, context):\n    self.layout.operator(MYCAT_OT_simple_action.bl_idname)\n\ndef register():\n    bpy.utils.register_class(MYCAT_OT_simple_action)\n    bpy.types.VIEW3D_MT_object.append(menu_func)\n\ndef unregister():\n    bpy.types.VIEW3D_MT_object.remove(menu_func)\n    bpy.utils.unregister_class(MYCAT_OT_simple_action)\n```\n\n### Operator Reporting\n\n```python\n# Report types: 'DEBUG', 'INFO', 'OPERATOR', 'WARNING', 'ERROR', 'ERROR_INVALID_INPUT'\nself.report({'INFO'}, \"Operation completed\")\nself.report({'WARNING'}, \"Check the result\")\nself.report({'ERROR'}, \"Something went wrong\")  # Shows in status bar, does NOT raise\n```\n\n### bl_idname Naming Convention\n\n```\nCLASS_OT_operator_name\n│      │   │\n│      │   └─ snake_case descriptive name\n│      └───── OT = Operator Type (ALWAYS \"OT\" for operators)\n└──────────── UPPERCASE category prefix (matches addon\u002Fmodule)\n```\n\nThe `bl_idname` string format: `\"category.operator_name\"` — both parts lowercase.\nThe class name format: `CATEGORY_OT_operator_name` — category uppercase, rest snake_case.\n\n```python\n# CORRECT:\nclass MESH_OT_add_custom(bpy.types.Operator):\n    bl_idname = \"mesh.add_custom\"        # lowercase.lowercase\n\n# WRONG: bl_idname has uppercase:\nclass MESH_OT_add_custom(bpy.types.Operator):\n    bl_idname = \"Mesh.AddCustom\"         # WILL FAIL at registration\n```\n\n### bl_options Reference\n\n| Flag | Use When |\n|------|----------|\n| `'REGISTER'` | ALWAYS — makes operator visible in info log and F3 search |\n| `'UNDO'` | Operator modifies scene data (objects, meshes, materials) |\n| `'UNDO_GROUPED'` | Multiple rapid calls should be one undo step (e.g., timer-based updates) |\n| `'BLOCKING'` | Modal operator should block ALL other event handlers |\n| `'GRAB_CURSOR'` | Modal with mouse movement should wrap cursor at screen edges |\n| `'GRAB_CURSOR_X'` | Wrap cursor on X axis only |\n| `'GRAB_CURSOR_Y'` | Wrap cursor on Y axis only |\n| `'INTERNAL'` | Operator should NOT appear in F3 search menu |\n| `'PRESET'` | Show preset selector in operator properties panel |\n| `'MACRO'` | Operator is a macro containing sub-operators |\n| `'MODAL_PRIORITY'` | (4.2+) Receive events before other modal operators |\n\n### Return Values\n\n| Value | When to Use |\n|-------|------------|\n| `{'FINISHED'}` | Operator completed successfully |\n| `{'CANCELLED'}` | Operator was cancelled, no changes made |\n| `{'RUNNING_MODAL'}` | Operator is entering modal mode (from `invoke()`) |\n| `{'PASS_THROUGH'}` | Modal: allow other operators to also handle this event |\n| `{'INTERFACE'}` | Operator handled event but did not execute (popup shown) |\n\n---\n\n## Operator Method Signatures\n\n```python\nclass bpy.types.Operator:\n    bl_idname: str          # \"category.name\" — REQUIRED\n    bl_label: str           # Display name — REQUIRED\n    bl_description: str     # Tooltip (overrides docstring)\n    bl_options: set[str]    # {'REGISTER', 'UNDO', ...}\n    bl_translation_context: str  # i18n context\n    bl_undo_group: str      # Group name for undo grouping\n\n    @classmethod\n    def poll(cls, context) -> bool: ...\n\n    def execute(self, context) -> set[str]: ...\n    def invoke(self, context, event) -> set[str]: ...\n    def modal(self, context, event) -> set[str]: ...\n    def draw(self, context) -> None: ...\n    def cancel(self, context) -> None: ...\n\n    def report(self, type: set[str], message: str) -> None: ...\n\n    # Access layout for draw()\n    layout: bpy.types.UILayout  # Available in draw()\n```\n\n### Event Object (used in invoke\u002Fmodal)\n\n```python\nevent.type      # str: 'LEFTMOUSE', 'RIGHTMOUSE', 'ESC', 'TIMER', 'A', 'B', etc.\nevent.value     # str: 'PRESS', 'RELEASE', 'CLICK', 'DOUBLE_CLICK', 'NOTHING'\nevent.mouse_x   # int: absolute mouse X position\nevent.mouse_y   # int: absolute mouse Y position\nevent.mouse_region_x  # int: mouse X relative to region\nevent.mouse_region_y  # int: mouse Y relative to region\nevent.shift     # bool: Shift held\nevent.ctrl      # bool: Ctrl held\nevent.alt       # bool: Alt held\nevent.oskey     # bool: OS\u002FSuper key held\n```\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Complete API signatures for Operator, WindowManager, Event, and registration functions\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Working code examples for all operator patterns\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — Common mistakes when writing operators, with fixes\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Operator.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.ops.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Event.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F4.0\u002Fpython_api\u002F\n\n### Related Skills\n\n- [blender-core-api](..\u002F..\u002Fcore\u002Fblender-core-api\u002FSKILL.md) — bpy module structure, context system, data access patterns\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when creating custom Blender operators -- bpy.types.Operator subclasses with execute, invoke, or modal methods. Prevents the common mistake of not implementing poll() (causing silent failures) or using wrong bl_idname format. Covers operator lifecycle, bl_options, return values, properties, and context.temp_override (4.0+ replacement for context override). Keywords: Operator, execute, invoke, modal, poll, bl_idname, bl_options, temp_override, REGISTER, UNDO, operator properties, bpy.ops, create custom operator, add button, operator CANCELLED.\n","Designed for Claude Code. Requires Blender 3.x\u002F4.x\u002F5.x with Python.","main","9bb7acf0c2ec4f44373969cb14e55af3c9a8385f","plugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-operators","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot","2026-11-09 13:26:47",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-operators",{"tool":40,"command":41},"bunx","bunx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-operators",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-operators","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-operators\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fanti-patterns.md","REFERENCE","参考文档",15076,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-operators\u002Freferences\u002Fanti-patterns.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",14245,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-operators\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fmethods.md",12661,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-operators\u002Freferences\u002Fmethods.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7FBFSZ93YM463CGS91D0TZG","manimce-best-practices","Trigger when: (1) User mentions \"manim\" or \"Manim Community\" or \"ManimCE\", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes.\n\nBest practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX\u002FMathTex, 3D with ThreeDScene, camera control, styling, and CLI usage.\n\nNOT for ManimGL\u002F3b1b version (which uses `manimlib` imports and `manimgl` CLI).","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7FB2K59HNNXS9WKHAMWHC3C","drawio","Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML\u002FER, org charts, Mermaid\u002FCSV conversion, existing .drawio bundles, style presets, themes, and non-publication formula diagrams. For publication figures (paper, thesis, IEEE, camera-ready) use drawio-academic-skills instead.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7FB2BWX7GWK9H2X8BGCYDDD","drawio-academic-skills","Publication-figure overlay for draw.io. Use instead of drawio whenever the diagram is for a paper, thesis, dissertation, journal, conference, IEEE\u002FACM submission, manuscript, camera-ready, Word\u002FLaTeX figure, or other publication. Applies venue, figure-type, color, caption\u002Flegend, formula, and paper-readability gates for architecture, workflow, roadmap, network-topology, and replicated paper figures.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio-academic-skills\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7FB22JESEAV8T15DJT3D444","uncertainty-and-units","Tracks physical units and propagates measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Funcertainty-and-units\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7FB1ANRSG28R335FDY9SA3R","statistical-analysis","Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7FB15KRA9D7JCPH4P9T6XJY","simpy","Builds, inspects, tests, and analyzes bounded process-based discrete-event simulations with SimPy. Use for event scheduling, resource queues, interrupts, monitoring, independent replications, warm-up, and reproducible output analysis.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fsimpy\u002FSKILL.md",[],[]]