[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FA0TPEB3GBY1FQ5KTEYN16":3,"skill-same:01M7FA0TPEB3GBY1FQ5KTEYN16":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},"01M7FA0TPEB3GBY1FQ5KTEYN16","blender-errors-data",null,"Use when debugging Blender ReferenceError from removed objects, undo-invalidated bpy.data references, or stale ID pointers. Prevents the common crash of caching bpy.data references across undo\u002Fredo operations (references become invalid). Covers safe data access patterns, ID reference caching pitfalls, data lifecycle management, and bpy.data collections. Keywords: ReferenceError, undo, stale reference, bpy.data, ID pointer, data invalidation, removed object, data lifecycle, StructRNA, Blender crash, object disappeared after undo, StructRNA has been removed.","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\u002Ferrors\u002Fblender-errors-data\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: blender-errors-data\ndescription: >\n  Use when debugging Blender ReferenceError from removed objects, undo-invalidated bpy.data\n  references, or stale ID pointers. Prevents the common crash of caching bpy.data references\n  across undo\u002Fredo operations (references become invalid). Covers safe data access patterns,\n  ID reference caching pitfalls, data lifecycle management, and bpy.data collections.\n  Keywords: ReferenceError, undo, stale reference, bpy.data, ID pointer, data invalidation, removed object, data lifecycle, StructRNA, Blender crash, object disappeared after undo, StructRNA has been removed.\nlicense: MIT\ncompatibility: Designed for Claude Code. Requires Python 3.x.\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# blender-errors-data\n\n## Quick Reference\n\n### Critical Rules\n\n**NEVER** store direct `bpy.data` references (objects, meshes, materials) across undo\u002Fredo, file load, or file revert operations — ALL Python pointers to Blender data are invalidated.\n\n**NEVER** access a data block after calling `bpy.data.\u003Ccollection>.remove()` on it — the StructRNA is freed and access raises `ReferenceError`.\n\n**NEVER** assume `bpy.data.\u003Ccollection>.new(name)` returns the exact name you passed — Blender appends `.001`, `.002`, etc. when a name already exists.\n\n**NEVER** keep references to `CollectionProperty` items across `.add()` or `.remove()` calls — the underlying C array is re-allocated, invalidating all prior element pointers.\n\n**NEVER** use `del obj[\"prop\"]` to reset RNA-defined properties in Blender 5.0+ — use `obj.property_unset(\"prop\")` instead.\n\n**NEVER** use `obj[\"cycles\"]` dict-like access for system properties in Blender 5.0+ — system properties are separated from custom properties.\n\n**ALWAYS** store object\u002Fdata block names (strings) or stable identifiers instead of direct `bpy` references when the reference must survive across operator execution, undo, or file operations.\n\n**ALWAYS** re-fetch references from `bpy.data.\u003Ccollection>` using `.get(name)` before accessing data that may have been invalidated.\n\n**ALWAYS** store the return value of `bpy.data.\u003Ccollection>.new()` directly in a variable — do not look up by name afterward.\n\n**ALWAYS** use `bpy.data.objects.get(name)` (returns `None`) instead of `bpy.data.objects[name]` (raises `KeyError`) when the data block may not exist.\n\n### Error Identification Table\n\n| Error Message | Root Cause | Section |\n|---------------|------------|---------|\n| `ReferenceError: StructRNA of type X has been removed` | Accessing data block after `remove()` call | [Removed Data Access](#error-1-referenceerror-from-removed-data) |\n| `ReferenceError` after Ctrl+Z | Undo invalidated all bpy references | [Undo Invalidation](#error-2-undo-invalidates-all-references) |\n| `KeyError: 'bpy_prop_collection[key] not found'` | Name collision — Blender renamed the data block | [Name Collision](#error-3-name-collision-on-data-creation) |\n| Crash \u002F segfault after `CollectionProperty.add()` | Stale pointer to re-allocated array element | [Stale Collection References](#error-4-stale-collectionproperty-references) |\n| `ReferenceError` after file load\u002Frevert | File operation rebuilt entire data model | [File Operation Invalidation](#error-5-file-operations-invalidate-references) |\n| `KeyError` with `del obj[\"prop\"]` in 5.0 | IDProperty separation — dict access removed for system props | [5.0 IDProperty Changes](#error-6-blender-50-idproperty-separation) |\n\n### Decision Tree: Safe Data Access\n\n```\nNeed to reference a Blender data block?\n├── Will you use it immediately (same function, no operators called)?\n│   └── YES → Direct reference is safe: obj = bpy.data.objects[\"Cube\"]\n├── Will an operator with undo run between store and access?\n│   └── YES → Store NAME, re-fetch later: name = obj.name\n├── Will undo\u002Fredo possibly occur (modal operator, interactive use)?\n│   └── YES → Store NAME, re-fetch on every access\n├── Will file load\u002Frevert occur?\n│   └── YES → Store NAME, re-fetch after load_post handler fires\n└── Will CollectionProperty.add()\u002Fremove() be called?\n    └── YES → Re-fetch ALL element references after modification\n```\n\n### Decision Tree: Diagnosing ReferenceError\n\n```\nGot ReferenceError: StructRNA of type X has been removed?\n├── Did you call bpy.data.\u003Ccollection>.remove() on this data?\n│   └── YES → Do not access the variable after remove()\n├── Did undo\u002Fredo happen since you obtained the reference?\n│   └── YES → Re-fetch by name from bpy.data\n├── Did a file load\u002Frevert happen?\n│   └── YES → Re-fetch by name from bpy.data\n├── Is this inside a modal operator?\n│   └── YES → Store name in operator property, re-fetch each modal() call\n└── Did you switch modes (Edit → Object)?\n    └── YES → Re-fetch mesh data references after mode switch\n```\n\n---\n\n## Error 1: ReferenceError from Removed Data\n\nWhen a data block is removed via `bpy.data.\u003Ccollection>.remove()`, ANY Python variable still pointing to that data raises `ReferenceError` on access.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN\nmesh = bpy.data.meshes.new(\"TempMesh\")\nbpy.data.meshes.remove(mesh)\nprint(mesh.name)  # ReferenceError: StructRNA of type Mesh has been removed\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT\nmesh = bpy.data.meshes.new(\"TempMesh\")\nmesh_name = mesh.name  # Save name before removal if needed\nbpy.data.meshes.remove(mesh)\nmesh = None  # Explicitly clear the reference\n```\n\n**Cascading removal**: Removing an object does NOT automatically remove its data. Removing a mesh does NOT automatically remove objects using it. Track dependencies manually.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: Safe removal of object AND its data\nobj = bpy.data.objects.get(\"MyObject\")\nif obj:\n    mesh = obj.data\n    bpy.data.objects.remove(obj)\n    if mesh and mesh.users == 0:\n        bpy.data.meshes.remove(mesh)\n```\n\n---\n\n## Error 2: Undo Invalidates ALL References\n\nWhen undo or redo occurs, Blender rebuilds the entire data model from its undo history. ALL Python references to `bpy.types.ID` subclasses (objects, meshes, materials, scenes, etc.) become invalid. This is the single most dangerous data access pitfall.\n\n**When invalidation occurs:**\n- `bpy.ops.ed.undo()` \u002F `bpy.ops.ed.redo()`\n- Interactive Ctrl+Z \u002F Ctrl+Shift+Z by the user\n- `bpy.ops.wm.open_mainfile()` (file load)\n- `bpy.ops.wm.revert_mainfile()` (file revert)\n- Any operator with built-in undo support that the user subsequently undoes\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN: reference held across undo\nobj = bpy.data.objects[\"Cube\"]\nbpy.ops.ed.undo()\nobj.location.x = 1.0  # ReferenceError or crash\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: store name, re-fetch\nobj_name = bpy.data.objects[\"Cube\"].name\nbpy.ops.ed.undo()\nobj = bpy.data.objects.get(obj_name)\nif obj is not None:\n    obj.location.x = 1.0\n```\n\nSee [references\u002Fexamples.md](references\u002Fexamples.md) for the `SafeObjectRef` wrapper pattern.\n\n---\n\n## Error 3: Name Collision on Data Creation\n\nBlender enforces unique names within each `bpy.data` collection. When you create a data block with a name that already exists, Blender silently appends `.001`, `.002`, etc.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN: assuming exact name\nbpy.data.meshes.new(name=\"MyMesh\")\nmesh = bpy.data.meshes[\"MyMesh\"]  # KeyError if \"MyMesh\" already existed — it became \"MyMesh.001\"\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: capture return value\nmesh = bpy.data.meshes.new(name=\"MyMesh\")  # Returns the actual data block\nprint(mesh.name)  # May be \"MyMesh.001\" — use this variable, never look up by name\n```\n\n**Renaming also triggers this**: If you set `obj.name = \"Cube\"` but \"Cube\" already exists, Blender renames the OTHER object to \"Cube.001\". Code storing the old name of the other object will break.\n\n---\n\n## Error 4: Stale CollectionProperty References\n\n`CollectionProperty` elements are stored in a contiguous C array. Calling `.add()` or `.remove()` may re-allocate the entire array, invalidating ALL Python references to existing elements.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN: stale pointer after re-allocation\nitems = bpy.context.scene.my_collection\nfirst_item = items.add()\nfirst_item.name = \"First\"\n\nfor i in range(100):\n    items.add()  # May re-allocate entire array\n\nfirst_item.name = \"Updated\"  # CRASH or undefined behavior — pointer is invalid\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: re-fetch by index after modifications\nitems = bpy.context.scene.my_collection\nitems.add()\nitems[len(items) - 1].name = \"First\"\n\nfor i in range(100):\n    items.add()\n\nitems[0].name = \"Updated\"  # Safe — accessed by index, not stale pointer\n```\n\n---\n\n## Error 5: File Operations Invalidate References\n\nFile load and revert rebuild the entire data model, identical to undo invalidation. References obtained before the file operation are invalid.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN\nobj = bpy.data.objects[\"Wall\"]\nbpy.ops.wm.open_mainfile(filepath=\"\u002Fpath\u002Fto\u002Fother.blend\")\nprint(obj.name)  # ReferenceError — entire data model was replaced\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: use load_post handler\nfrom bpy.app.handlers import persistent\n\n@persistent\ndef on_file_loaded(filepath):\n    obj = bpy.data.objects.get(\"Wall\")\n    if obj:\n        print(f\"Found Wall in new file: {obj.name}\")\n\nbpy.app.handlers.load_post.append(on_file_loaded)\n```\n\n---\n\n## Error 6: Blender 5.0 IDProperty Separation\n\nBlender 5.0 separates system-defined properties (RNA properties defined via `bpy.props`) from user-defined custom properties. Dict-like access to system properties is removed.\n\n```python\n# Blender 4.x: Works (but deprecated)\nvalue = bpy.context.scene[\"cycles\"]  # Accesses Cycles settings via dict syntax\ndel obj[\"my_rna_prop\"]               # Resets RNA property via dict deletion\n\n# Blender 5.0+: BROKEN\nvalue = bpy.context.scene[\"cycles\"]  # KeyError — system props not in dict\ndel obj[\"my_rna_prop\"]               # Fails for RNA-defined properties\n\n# Blender 5.0+: CORRECT\nvalue = bpy.context.scene.cycles     # Access via attribute\nobj.property_unset(\"my_rna_prop\")    # Reset RNA property to default\n\n# Custom properties still use dict access in ALL versions\nobj[\"my_custom_prop\"] = 42           # Works in 3.x\u002F4.x\u002F5.x\nvalue = obj[\"my_custom_prop\"]        # Works in 3.x\u002F4.x\u002F5.x\ndel obj[\"my_custom_prop\"]            # Works in 3.x\u002F4.x\u002F5.x\n```\n\n**Migration for legacy files**: Blender 5.0 auto-duplicates old IDProperties into system storage when opening pre-5.0 files. Clean up with:\n\n```python\n# Blender 5.0+: Cleanup duplicated IDProperties from legacy files\nfor ob in bpy.data.objects:\n    sys_props = ob.bl_system_properties_get()\n    # Migrate values if needed, then remove old custom prop duplicates\n```\n\n---\n\n## Mode Switching Invalidates Mesh Data\n\nSwitching between Edit Mode and Object Mode re-allocates mesh data arrays. References to `mesh.vertices`, `mesh.polygons`, `mesh.edges`, and UV layers obtained before the switch are invalid.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN\nverts = bpy.context.active_object.data.vertices\nbpy.ops.object.mode_set(mode='EDIT')\nbpy.ops.object.mode_set(mode='OBJECT')\nprint(verts[0].co)  # Crash or stale data — verts pointer is invalid\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: re-fetch after mode switch\nbpy.ops.object.mode_set(mode='EDIT')\nbpy.ops.object.mode_set(mode='OBJECT')\nverts = bpy.context.active_object.data.vertices  # Re-fetch\nprint(verts[0].co)  # Safe\n```\n\n---\n\n## Safe Data Access Patterns Summary\n\n| Pattern | When to Use | Implementation |\n|---------|-------------|----------------|\n| Store name, re-fetch | Modal operators, handlers, any long-lived reference | `name = obj.name` → `bpy.data.objects.get(name)` |\n| Use `.get()` not `[]` | Any lookup where data may not exist | `bpy.data.objects.get(\"X\")` returns `None` |\n| Capture return value | After `.new()` calls | `mesh = bpy.data.meshes.new(\"X\")` |\n| Re-fetch after collection mutation | After `.add()` \u002F `.remove()` on CollectionProperty | Access by index, not stored reference |\n| Null-check after re-fetch | After undo, file load, or any invalidation point | `if obj is not None:` |\n| Use `@persistent` on handlers | Any handler in an addon | Without it, handler is removed on file load |\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Data access API signatures for bpy.data collections, ID lifecycle, and property access\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Complete error resolution examples with safe patterns\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — Common data access mistakes with explanations\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Finfo_gotcha.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Finfo_gotchas_internal_data_and_python_objects.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Finfo_gotchas_crashes.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F5.0\u002Fpython_api\u002F\n","# blender-errors-data\n\n## Quick Reference\n\n### Critical Rules\n\n**NEVER** store direct `bpy.data` references (objects, meshes, materials) across undo\u002Fredo, file load, or file revert operations — ALL Python pointers to Blender data are invalidated.\n\n**NEVER** access a data block after calling `bpy.data.\u003Ccollection>.remove()` on it — the StructRNA is freed and access raises `ReferenceError`.\n\n**NEVER** assume `bpy.data.\u003Ccollection>.new(name)` returns the exact name you passed — Blender appends `.001`, `.002`, etc. when a name already exists.\n\n**NEVER** keep references to `CollectionProperty` items across `.add()` or `.remove()` calls — the underlying C array is re-allocated, invalidating all prior element pointers.\n\n**NEVER** use `del obj[\"prop\"]` to reset RNA-defined properties in Blender 5.0+ — use `obj.property_unset(\"prop\")` instead.\n\n**NEVER** use `obj[\"cycles\"]` dict-like access for system properties in Blender 5.0+ — system properties are separated from custom properties.\n\n**ALWAYS** store object\u002Fdata block names (strings) or stable identifiers instead of direct `bpy` references when the reference must survive across operator execution, undo, or file operations.\n\n**ALWAYS** re-fetch references from `bpy.data.\u003Ccollection>` using `.get(name)` before accessing data that may have been invalidated.\n\n**ALWAYS** store the return value of `bpy.data.\u003Ccollection>.new()` directly in a variable — do not look up by name afterward.\n\n**ALWAYS** use `bpy.data.objects.get(name)` (returns `None`) instead of `bpy.data.objects[name]` (raises `KeyError`) when the data block may not exist.\n\n### Error Identification Table\n\n| Error Message | Root Cause | Section |\n|---------------|------------|---------|\n| `ReferenceError: StructRNA of type X has been removed` | Accessing data block after `remove()` call | [Removed Data Access](#error-1-referenceerror-from-removed-data) |\n| `ReferenceError` after Ctrl+Z | Undo invalidated all bpy references | [Undo Invalidation](#error-2-undo-invalidates-all-references) |\n| `KeyError: 'bpy_prop_collection[key] not found'` | Name collision — Blender renamed the data block | [Name Collision](#error-3-name-collision-on-data-creation) |\n| Crash \u002F segfault after `CollectionProperty.add()` | Stale pointer to re-allocated array element | [Stale Collection References](#error-4-stale-collectionproperty-references) |\n| `ReferenceError` after file load\u002Frevert | File operation rebuilt entire data model | [File Operation Invalidation](#error-5-file-operations-invalidate-references) |\n| `KeyError` with `del obj[\"prop\"]` in 5.0 | IDProperty separation — dict access removed for system props | [5.0 IDProperty Changes](#error-6-blender-50-idproperty-separation) |\n\n### Decision Tree: Safe Data Access\n\n```\nNeed to reference a Blender data block?\n├── Will you use it immediately (same function, no operators called)?\n│   └── YES → Direct reference is safe: obj = bpy.data.objects[\"Cube\"]\n├── Will an operator with undo run between store and access?\n│   └── YES → Store NAME, re-fetch later: name = obj.name\n├── Will undo\u002Fredo possibly occur (modal operator, interactive use)?\n│   └── YES → Store NAME, re-fetch on every access\n├── Will file load\u002Frevert occur?\n│   └── YES → Store NAME, re-fetch after load_post handler fires\n└── Will CollectionProperty.add()\u002Fremove() be called?\n    └── YES → Re-fetch ALL element references after modification\n```\n\n### Decision Tree: Diagnosing ReferenceError\n\n```\nGot ReferenceError: StructRNA of type X has been removed?\n├── Did you call bpy.data.\u003Ccollection>.remove() on this data?\n│   └── YES → Do not access the variable after remove()\n├── Did undo\u002Fredo happen since you obtained the reference?\n│   └── YES → Re-fetch by name from bpy.data\n├── Did a file load\u002Frevert happen?\n│   └── YES → Re-fetch by name from bpy.data\n├── Is this inside a modal operator?\n│   └── YES → Store name in operator property, re-fetch each modal() call\n└── Did you switch modes (Edit → Object)?\n    └── YES → Re-fetch mesh data references after mode switch\n```\n\n---\n\n## Error 1: ReferenceError from Removed Data\n\nWhen a data block is removed via `bpy.data.\u003Ccollection>.remove()`, ANY Python variable still pointing to that data raises `ReferenceError` on access.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN\nmesh = bpy.data.meshes.new(\"TempMesh\")\nbpy.data.meshes.remove(mesh)\nprint(mesh.name)  # ReferenceError: StructRNA of type Mesh has been removed\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT\nmesh = bpy.data.meshes.new(\"TempMesh\")\nmesh_name = mesh.name  # Save name before removal if needed\nbpy.data.meshes.remove(mesh)\nmesh = None  # Explicitly clear the reference\n```\n\n**Cascading removal**: Removing an object does NOT automatically remove its data. Removing a mesh does NOT automatically remove objects using it. Track dependencies manually.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: Safe removal of object AND its data\nobj = bpy.data.objects.get(\"MyObject\")\nif obj:\n    mesh = obj.data\n    bpy.data.objects.remove(obj)\n    if mesh and mesh.users == 0:\n        bpy.data.meshes.remove(mesh)\n```\n\n---\n\n## Error 2: Undo Invalidates ALL References\n\nWhen undo or redo occurs, Blender rebuilds the entire data model from its undo history. ALL Python references to `bpy.types.ID` subclasses (objects, meshes, materials, scenes, etc.) become invalid. This is the single most dangerous data access pitfall.\n\n**When invalidation occurs:**\n- `bpy.ops.ed.undo()` \u002F `bpy.ops.ed.redo()`\n- Interactive Ctrl+Z \u002F Ctrl+Shift+Z by the user\n- `bpy.ops.wm.open_mainfile()` (file load)\n- `bpy.ops.wm.revert_mainfile()` (file revert)\n- Any operator with built-in undo support that the user subsequently undoes\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN: reference held across undo\nobj = bpy.data.objects[\"Cube\"]\nbpy.ops.ed.undo()\nobj.location.x = 1.0  # ReferenceError or crash\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: store name, re-fetch\nobj_name = bpy.data.objects[\"Cube\"].name\nbpy.ops.ed.undo()\nobj = bpy.data.objects.get(obj_name)\nif obj is not None:\n    obj.location.x = 1.0\n```\n\nSee [references\u002Fexamples.md](references\u002Fexamples.md) for the `SafeObjectRef` wrapper pattern.\n\n---\n\n## Error 3: Name Collision on Data Creation\n\nBlender enforces unique names within each `bpy.data` collection. When you create a data block with a name that already exists, Blender silently appends `.001`, `.002`, etc.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN: assuming exact name\nbpy.data.meshes.new(name=\"MyMesh\")\nmesh = bpy.data.meshes[\"MyMesh\"]  # KeyError if \"MyMesh\" already existed — it became \"MyMesh.001\"\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: capture return value\nmesh = bpy.data.meshes.new(name=\"MyMesh\")  # Returns the actual data block\nprint(mesh.name)  # May be \"MyMesh.001\" — use this variable, never look up by name\n```\n\n**Renaming also triggers this**: If you set `obj.name = \"Cube\"` but \"Cube\" already exists, Blender renames the OTHER object to \"Cube.001\". Code storing the old name of the other object will break.\n\n---\n\n## Error 4: Stale CollectionProperty References\n\n`CollectionProperty` elements are stored in a contiguous C array. Calling `.add()` or `.remove()` may re-allocate the entire array, invalidating ALL Python references to existing elements.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN: stale pointer after re-allocation\nitems = bpy.context.scene.my_collection\nfirst_item = items.add()\nfirst_item.name = \"First\"\n\nfor i in range(100):\n    items.add()  # May re-allocate entire array\n\nfirst_item.name = \"Updated\"  # CRASH or undefined behavior — pointer is invalid\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: re-fetch by index after modifications\nitems = bpy.context.scene.my_collection\nitems.add()\nitems[len(items) - 1].name = \"First\"\n\nfor i in range(100):\n    items.add()\n\nitems[0].name = \"Updated\"  # Safe — accessed by index, not stale pointer\n```\n\n---\n\n## Error 5: File Operations Invalidate References\n\nFile load and revert rebuild the entire data model, identical to undo invalidation. References obtained before the file operation are invalid.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN\nobj = bpy.data.objects[\"Wall\"]\nbpy.ops.wm.open_mainfile(filepath=\"\u002Fpath\u002Fto\u002Fother.blend\")\nprint(obj.name)  # ReferenceError — entire data model was replaced\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: use load_post handler\nfrom bpy.app.handlers import persistent\n\n@persistent\ndef on_file_loaded(filepath):\n    obj = bpy.data.objects.get(\"Wall\")\n    if obj:\n        print(f\"Found Wall in new file: {obj.name}\")\n\nbpy.app.handlers.load_post.append(on_file_loaded)\n```\n\n---\n\n## Error 6: Blender 5.0 IDProperty Separation\n\nBlender 5.0 separates system-defined properties (RNA properties defined via `bpy.props`) from user-defined custom properties. Dict-like access to system properties is removed.\n\n```python\n# Blender 4.x: Works (but deprecated)\nvalue = bpy.context.scene[\"cycles\"]  # Accesses Cycles settings via dict syntax\ndel obj[\"my_rna_prop\"]               # Resets RNA property via dict deletion\n\n# Blender 5.0+: BROKEN\nvalue = bpy.context.scene[\"cycles\"]  # KeyError — system props not in dict\ndel obj[\"my_rna_prop\"]               # Fails for RNA-defined properties\n\n# Blender 5.0+: CORRECT\nvalue = bpy.context.scene.cycles     # Access via attribute\nobj.property_unset(\"my_rna_prop\")    # Reset RNA property to default\n\n# Custom properties still use dict access in ALL versions\nobj[\"my_custom_prop\"] = 42           # Works in 3.x\u002F4.x\u002F5.x\nvalue = obj[\"my_custom_prop\"]        # Works in 3.x\u002F4.x\u002F5.x\ndel obj[\"my_custom_prop\"]            # Works in 3.x\u002F4.x\u002F5.x\n```\n\n**Migration for legacy files**: Blender 5.0 auto-duplicates old IDProperties into system storage when opening pre-5.0 files. Clean up with:\n\n```python\n# Blender 5.0+: Cleanup duplicated IDProperties from legacy files\nfor ob in bpy.data.objects:\n    sys_props = ob.bl_system_properties_get()\n    # Migrate values if needed, then remove old custom prop duplicates\n```\n\n---\n\n## Mode Switching Invalidates Mesh Data\n\nSwitching between Edit Mode and Object Mode re-allocates mesh data arrays. References to `mesh.vertices`, `mesh.polygons`, `mesh.edges`, and UV layers obtained before the switch are invalid.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: BROKEN\nverts = bpy.context.active_object.data.vertices\nbpy.ops.object.mode_set(mode='EDIT')\nbpy.ops.object.mode_set(mode='OBJECT')\nprint(verts[0].co)  # Crash or stale data — verts pointer is invalid\n\n# Blender 3.x\u002F4.x\u002F5.x: CORRECT: re-fetch after mode switch\nbpy.ops.object.mode_set(mode='EDIT')\nbpy.ops.object.mode_set(mode='OBJECT')\nverts = bpy.context.active_object.data.vertices  # Re-fetch\nprint(verts[0].co)  # Safe\n```\n\n---\n\n## Safe Data Access Patterns Summary\n\n| Pattern | When to Use | Implementation |\n|---------|-------------|----------------|\n| Store name, re-fetch | Modal operators, handlers, any long-lived reference | `name = obj.name` → `bpy.data.objects.get(name)` |\n| Use `.get()` not `[]` | Any lookup where data may not exist | `bpy.data.objects.get(\"X\")` returns `None` |\n| Capture return value | After `.new()` calls | `mesh = bpy.data.meshes.new(\"X\")` |\n| Re-fetch after collection mutation | After `.add()` \u002F `.remove()` on CollectionProperty | Access by index, not stored reference |\n| Null-check after re-fetch | After undo, file load, or any invalidation point | `if obj is not None:` |\n| Use `@persistent` on handlers | Any handler in an addon | Without it, handler is removed on file load |\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Data access API signatures for bpy.data collections, ID lifecycle, and property access\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Complete error resolution examples with safe patterns\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — Common data access mistakes with explanations\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Finfo_gotcha.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Finfo_gotchas_internal_data_and_python_objects.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Finfo_gotchas_crashes.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F5.0\u002Fpython_api\u002F\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when debugging Blender ReferenceError from removed objects, undo-invalidated bpy.data references, or stale ID pointers. Prevents the common crash of caching bpy.data references across undo\u002Fredo operations (references become invalid). Covers safe data access patterns, ID reference caching pitfalls, data lifecycle management, and bpy.data collections. Keywords: ReferenceError, undo, stale reference, bpy.data, ID pointer, data invalidation, removed object, data lifecycle, StructRNA, Blender crash, object disappeared after undo, StructRNA has been removed.\n","Designed for Claude Code. Requires Python 3.x.","main","9bb7acf0c2ec4f44373969cb14e55af3c9a8385f","plugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Ferrors\u002Fblender-errors-data","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-errors-data",{"tool":40,"command":41},"bunx","bunx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-errors-data",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-errors-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Ferrors\u002Fblender-errors-data\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fanti-patterns.md","REFERENCE","参考文档",10017,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Ferrors\u002Fblender-errors-data\u002Freferences\u002Fanti-patterns.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",10575,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Ferrors\u002Fblender-errors-data\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fmethods.md",8591,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Ferrors\u002Fblender-errors-data\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",[],[]]