2 Note that when keying data paths which contain nested properties this must be
3 done from the :class:`ID` subclass, in this case the :class:`Armature` rather
8 from bpy.props import PointerProperty
11 # define a nested property
12 class MyPropGroup(bpy.types.PropertyGroup):
13 nested = bpy.props.FloatProperty(name="Nested", default=0.0)
15 # register it so its available for all bones
16 bpy.utils.register_class(MyPropGroup)
17 bpy.types.Bone.my_prop = PointerProperty(type=MyPropGroup,
21 obj = bpy.data.objects["Armature"]
24 # set the keyframe at frame 1
25 arm.bones["Bone"].my_prop_group.nested = 10
26 arm.keyframe_insert(data_path='bones["Bone"].my_prop.nested',