How to register a single property (not a property group) in blender 2.8?

My attempt

This is what I am doing at the moment inside my addon __init__.py:

# ...
bpy.types.Material.myprop = bpy.props.PointerProperty(type=MyProp)
# ...

with MyProp class:

class MyProp(bpy.types.Property):
    name: "Some name"
    description: "Some description"

The idea is so I can see access this property through:


Here's the error I am getting when loading the add-on:

bpy.types.Material.myprop = bpy.props.PointerProperty(type=Myprop)
ValueError: bpy_struct "Material" registration error: myprop could not register

1 Answer 1


Silly me... This is what I was looking for:

bpy.types.Material.myprop = bpy.props.FloatProperty(name="myprop")


Assigning property to existing class


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .