custom-propertieslisted
Install: claude install-skill TMHSDigital/Blender-Developer-Tools
# Custom Properties
## Trigger
Use this skill when the user:
- Wants to attach data to objects, scenes, or other Blender datablocks that survives save and load
- Mentions `bpy.props`, `PropertyGroup`, `PointerProperty`, "custom properties"
- Is unsure where to store add-on settings
- Sees a deprecation warning about property assignment
## Required inputs
- **What you want to store**: a single number, a small struct, a list of items, or a complex hierarchy
- **Where it should live**: Scene (per-document), Object (per-object), WindowManager (session-only), AddonPreferences (per-user)
- **Whether it must persist** through save/load (almost always yes)
## The type annotation form (mandatory since 2.8)
```python
import bpy
class MY_ADDON_PG_settings(bpy.types.PropertyGroup):
intensity: bpy.props.FloatProperty(
name="Intensity",
description="How strong the effect is",
default=1.0,
min=0.0,
max=10.0,
)
use_smoothing: bpy.props.BoolProperty(name="Smooth", default=True)
mode: bpy.props.EnumProperty(
name="Mode",
items=[
('FAST', "Fast", "Lower quality, faster"),
('GOOD', "Good", "Balanced"),
('BEST', "Best", "Best quality, slower"),
],
default='GOOD',
)
```
The properties are declared with `:` (PEP 526 annotations), not `=` (assignment). Blender's metaclass scans the annotation namespace and registers each `bpy.props.*` it finds.
The assignment for