Custom Properties

PropertyGroups are the base class for dynamically defined sets of properties.

They can be used to extend existing blender data with your own types which can be animated, accessed from the user interface and from python.


The values assigned to blender data are saved to disk but the class definitions are not, this means whenever you load blender the class needs to be registered too.

This is best done by creating an addon which loads on startup and registers your properties.


PropertyGroups must be registered before assigning them to blender data.

See also

Property types used in class declarations are all in bpy.props

import bpy

class MyPropertyGroup(bpy.types.PropertyGroup):
    custom_1 = bpy.props.FloatProperty(name="My Float")
    custom_2 = bpy.props.IntProperty(name="My Int")


bpy.types.Object.my_prop_grp = bpy.props.PointerProperty(type=MyPropertyGroup)

# test this worked[0].my_prop_grp.custom_1 = 22.0

base class — bpy_struct

subclasses — CyclesWorldSettings, CyclesCurveRenderSettings, OperatorStrokeElement, NodeSetting, CyclesMeshSettings, CyclesRenderSettings, CyclesVisibilitySettings, CyclesMaterialSettings, SelectedUvElement, CyclesCameraSettings, OperatorFileListElement, CyclesLampSettings, OperatorMousePath, CyclesCurveSettings

class bpy.types.PropertyGroup(bpy_struct)

Group of ID properties


Unique name used in the code and scripting

Type :string, default “”, (never None)

Inherited Properties

Inherited Functions


Table Of Contents

Previous topic


Next topic