Support Bones as a type for PointerProperties

Currently, it’s not possible to store a Bone, PoseBone or EditBone in a PointerProperty as these types do not inherit from ID.
It makes it really hard to store a reference to these properly without using their names.

As discussed with @sybren and @JeroenBakker on the #python channel in blender.chat The current solution is to assign a unique ID to each bone and assign that ID in a StringProperty and use that to keep track of the bones, not really ideal.

3 Likes

The lack of PointerProperty for Bones means that it’s not possible for addons to robustly use a bone selector (e.g. UILayout.prop_search). This is very limiting for addons which want to manipulate bones.