BoneCollection(bpy_struct)#

base class — bpy_struct

class bpy.types.BoneCollection(bpy_struct)#

Bone collection in an Armature data-block

bones#

Bones assigned to this bone collection. In armature edit mode this will always return an empty list of bones, as the bone collection memberships are only synchronized when exiting edit mode

Type:

bpy_prop_collection of Bone, (readonly)

child_number#

Index of this collection into its parent’s list of children. Note that finding this index requires a scan of all the bone collections, so do access this with care

Type:

int in [-inf, inf], default 0

children#
Type:

bpy_prop_collection of BoneCollection, (readonly)

index#

Index of this bone collection in the armature.collections_all array. Note that finding this index requires a scan of all the bone collections, so do access this with care

Type:

int in [-inf, inf], default 0, (readonly)

is_editable#

This collection is owned by a local Armature, or was added via a library override in the current blend file

Type:

boolean, default False, (readonly)

is_expanded#

This bone collection is expanded in the bone collections tree view

Type:

boolean, default False

is_local_override#

This collection was added via a library override in the current blend file

Type:

boolean, default False, (readonly)

is_solo#

Show only this bone collection, and others also marked as ‘solo’

Type:

boolean, default False

is_visible#

Bones in this collection will be visible in pose/object mode

Type:

boolean, default False

is_visible_ancestors#

True when all of the ancestors of this bone collection are marked as visible; always True for root bone collections

Type:

boolean, default False, (readonly)

is_visible_effectively#

Whether this bone collection is effectively visible in the viewport. This is True when this bone collection and all of its ancestors are visible, or when it is marked as ‘solo’

Type:

boolean, default False, (readonly)

name#

Unique within the Armature

Type:

string, default “”, (never None)

parent#

Parent bone collection. Note that accessing this requires a scan of all the bone collections to find the parent

Type:

BoneCollection

bones_recursive#

A set of all bones assigned to this bone collection and its child collections.

(readonly)

assign(bone)#

Assign the given bone to this collection

Parameters:

bone (AnyType) – Bone to assign to this collection. This must be a Bone, PoseBone, or EditBone

Returns:

Assigned, Whether the bone was actually assigned; will be false if the bone was already member of the collection

Return type:

boolean

unassign(bone)#

Remove the given bone from this collection

Parameters:

bone (AnyType) – Bone to remove from this collection. This must be a Bone, PoseBone, or EditBone

Returns:

Unassigned, Whether the bone was actually removed; will be false if the bone was not a member of the collection to begin with

Return type:

boolean

classmethod bl_rna_get_subclass(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References