blender-errors-data

Prevents Blender Python ReferenceError and crash scenarios from stale bpy.data references.

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-errors-data-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: blender-errors-data
Source: https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/errors/blender-errors-data
Command: npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill blender-errors-data-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents Blender Python crashes and ReferenceError issues caused by stale bpy.data pointers after undo/redo, file load/revert, removals, and CollectionProperty re-allocation.

Core Features & Use Cases

  • Safe data lifecycle guidance: Avoid accessing freed StructRNA objects after remove operations and track dependencies correctly.
  • Undo/redo-proof Blender referencing: Store stable identifiers (like names) and re-fetch from bpy.data to avoid invalidated ID pointers.
  • CollectionProperty mutation safety: Prevent crashes by never holding element references across add/remove operations; use re-fetching or index-based access instead.
  • Blender 5.0+ property access correctness: Use attribute access and property_unset for RNA/system properties instead of dict-like deletion.

Quick Start

Ask Claude to diagnose a ReferenceError by listing where the code caches bpy.data objects across operators/undo and then rewrite the access pattern to re-fetch safely by name.

Frequently Asked Questions about blender-errors-data

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

FAQPage Schema
Why does my Blender Python script throw a ReferenceError after an undo or redo operation?

A Blender Python ReferenceError occurs because undo/redo operations invalidate cached bpy.data ID pointers. You must replace stored object pointers with name-based re-fetching using .get() to maintain stable references across state changes.

How do I safely remove items from a CollectionProperty without crashing Blender?

To avoid Blender crashes when mutating a CollectionProperty, never hold element references across add or remove operations. Use re-fetching or index-based access patterns instead of caching element pointers during collection reallocation.

What is the correct way to delete RNA system properties in Blender 5.0+ Python scripting?

In Blender 5.0+ Python scripting, delete RNA system properties using attribute access and property_unset rather than dict-like deletion. This prevents access errors when modifying system-level property definitions.

How do I stop Blender from crashing when accessing a deleted mesh or object in bpy.data?

Blender crashes accessing freed StructRNA objects after remove mutations when you cache bpy.data pointers. Capture creation return values and avoid accessing references after remove operations to prevent invalid pointer dereferencing.

Can I cache bpy.data object references across multiple Blender operators safely?

Caching bpy.data object references across Blender operators is unsafe because undo/redo and file load operations invalidate ID pointers. Store stable identifiers like names and re-fetch from bpy.data within each operator execution instead.

What's the best way to debug stale pointer issues in Blender Python addons?

Debug stale Blender Python pointer issues by listing where your code caches bpy.data objects across operators and undo boundaries, then rewriting the access pattern to re-fetch safely by name using .get() instead of holding references.