Module Armature :: Class Bone

Class Bone

source code

The Bone object

This object gives access to Bone-specific data in Blender. This object cannot be instantiated but is returned by BonesDict when the armature is not in editmode.

Instance Methods
Bool
hasParent()
Whether or not this bone has a parent
source code
Bool
hasChildren()
Whether or not this bone has children
source code
List of Bone object
getAllChildren()
Gets all the children under this bone including the children's children.
source code
Instance Variables
List of Bone Objects children
The children directly attached to this bone.
Float deformDist
The deform distance of the bone
Dictionary head
This Bone's "head" ending position when in rest state.
Float headRadius
The radius of this bones head (used for envalope bones)
Int layerMask
Layer bitmask Example:
Float length
The length of the bone.
Matrix Object matrix
This Bone's matrix.
String name
The name of this Bone.
List of Constants options
Various bone options which can be:
Bone Object parent
The parent Bone.
Dictionary roll
This Bone's roll value.
Int subdivision
The number of bone subdivisions.
Dictionary tail
This Bone's "tail" ending position when in rest state.
Float tailRadius
The radius of this bones head (used for envalope bones)
Float weight
The bone's weight.
Method Details

getAllChildren()

source code 
Gets all the children under this bone including the children's children.
Returns: List of Bone object
all bones under this one

Instance Variable Details

head

This Bone's "head" ending position when in rest state. Keys are:
  • 'ARMATURESPACE' - this head position in relation to the armature
  • 'BONESPACE' - the head position in relation to itself.
Type:
Dictionary

layerMask

Layer bitmask Example:
       # set bone to layers 14 and 16
       bone.layerMask = (1<<13) + (1<<15)
Type:
Int

length

The length of the bone. This cannot be set.
Type:
Float

matrix

This Bone's matrix. This cannot be set. Keys are:
  • 'ARMATURESPACE' - this matrix of the bone in relation to the armature
  • 'BONESPACE' - the matrix of the bone in relation to itself
Type:
Matrix Object

options

Various bone options which can be:
  • Armature.CONNECTED: IK to parent
  • Armature.HINGE: No parent rotation or scaling
  • Armature.NO_DEFORM: The bone does not deform geometry
  • Armature.MULTIPLY: Multiply vgroups by envelope
  • Armature.HIDDEN_EDIT: Hide bones in editmode
  • Armature.ROOT_SELECTED: Selection of root ball of bone
  • Armature.BONE_SELECTED: Selection of bone
  • Armature.TIP_SELECTED: Selection of tip ball of bone
Type:
List of Constants

roll

This Bone's roll value. Keys are:
  • 'ARMATURESPACE' - this roll in relation to the armature
  • 'BONESPACE' - the roll in relation to itself
Type:
Dictionary

tail

This Bone's "tail" ending position when in rest state. Keys are:
  • 'ARMATURESPACE' - this tail position in relation to the armature
  • 'BONESPACE' - the tail position in relation to itself
Type:
Dictionary