user: Describe Bpy.Types.Bone from the Blender manual or Python API, including usage steps and snippets.

assistant:  – Use display mode from armature (default). OCTAHEDRAL Octahedral – Display bones as octahedral shape. STICK Stick – Display bones as simple 2D lines with dots. BBONE B-Bone – Display bones as boxes, showing subdivision and B-Splines. ENVELOPE Envelope – Display bones as extruded spheres, showing deformation influence volume. WIRE Wire – Display bones as thin wires, showing subdivision and B-Splines. Type : enum in [ 'ARMATURE_DEFINED' , 'OCTAHEDRAL' , 'STICK' , 'BBONE' , 'ENVELOPE' , 'WIRE' ], default 'OCTAHEDRAL' envelope_distance ¶ Bone deformation distance (for Envelope deform only) Type : float in [0, 1000], default 0.0 envelope_weight ¶ Bone deformation weight (for Envelope deform only) Type : float in [0, 1000], default 0.0 head ¶ Location of head end of the bone relative to its parent Type : mathutils.Vector of 3 items in [-inf, inf], default (0.0, 0.0, 0.0), (readonly) head_local ¶ Location of head end of the bone relative to armature Type : mathutils.Vector of 3 items in [-inf, inf], default (0.0, 0.0, 0.0), (readonly) head_radius ¶ Radius of head of bone (for Envelope deform only) Type : float in [-inf, inf], default 0.0 hide ¶ Bone is not visible when it is in Edit Mode Type : boolean, default False hide_select ¶ Bone is able to be selected Type : boolean, default False inherit_scale ¶ Specifies how the bone inherits scaling from the parent bone FULL Full – Inherit all effects of parent scaling. FIX_SHEAR Fix Shear – Inherit scaling, but remove shearing of the child in the rest orientation. ALIGNED Aligned – Rotate non-uniform parent scaling to align with the child, applying parent X scale to child X axis, and so forth. AVERAGE Average – Inherit uniform scaling representing the overall change in the volume of the parent. NONE None – Completely ignore parent scaling. NONE_LEGACY None (Legacy) – Ignore parent scaling without compensating for parent shear. Replicates the effect of disabling the original Inherit Scale checkbox.. Type : enum in [ 'FULL' , 'FIX_SHEAR' , 'ALIGNED' , 'AVERAGE' , 'NONE' , 'NONE_LEGACY' ], default 'FULL' length ¶ Length of the bone Type : float in [-inf, inf], default 0.0, (readonly) matrix ¶ 3×3 bone matrix Type : mathutils.Matrix of 3 * 3 items in [-inf, inf], default ((0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0)), (readonly) matrix_local ¶ 4×4 bone matrix relative to armature Type : mathutils.Matrix of 4 * 4 items in [-inf, inf], default ((0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0)), (readonly) name ¶ Type : string, default “”, (never None) parent ¶ Parent bone (in same Armature) Type : Bone , (readonly) show_wire ¶ Bone is always displayed in wireframe regardless of viewport shading mode (useful for non-obstructive custom bone shapes) Type : boolean, default False tail ¶ Location of tail end of the bone relative to its parent Type : mathutils.Vector of 3 items in [-inf, inf], default (0.0, 0.0, 0.0), (readonly) tail_local ¶ Location of tail end of the bone relative to armature Type : mathutils.Vector of 3 items in [-inf, inf], default (0.0, 0.0, 0.0), (readonly) tail_radius ¶ Radius of tail of bone (for Envelope deform only) Type : float in [-inf, inf], default 0.0 use_connect ¶ When bone has a parent, bone’s head is stuck to the parent’s tail Type : boolean, default False, (readonly) use_cyclic_offset ¶ When bone does not have a parent, it receives cyclic offset effects (Deprecated) Type : boolean, default False use_deform ¶ Enable Bone to deform geometry Type : boolean, default False use_endroll_as_inroll ¶ Add Roll Out of the Start Handle bone to the Roll In value Type : boolean, default False use_envelope_multiply ¶ When deforming bone, multiply effects of Vertex Group weights with Envelope influence Type : boolean, default False use_inherit_rotation ¶ Bone inherits rotation or scale from parent bone Type : boolean, default False use_local_location ¶ Bone location is set in local space Type : boolean, default False use_relative_parent ¶ Object children will use relative transform, like deform Type : boolean, default False use_scale_easing ¶ Multiply the final easing values by the Scale In/Out Y factors Type : boolean, default False basename ¶ The name of this bone before any . character. (readonly) center ¶ The midpoint between the head and the tail. (readonly) children_recursive ¶ A list of all children from this bone. Note Takes O(len(bones)**2) time. (readonly) children_recursive_basename ¶ Returns a chain of children with the same base name as this bone. Only direct chains are supported, forks caused by multiple children with matching base names will terminate the function and not be returned. Note Takes O(len(bones)**2) time. (readonly) parent_recursive ¶ A list of parents, starting with the immediate parent. (readonly) vector ¶ The direction this bone is pointing. Utility function for (tail - head) (readonly) x_axis ¶ Vector pointing down the x-axis of the bone. (readonly) y_axis ¶ Vector pointing down the y-axis of the bone. (readonly) z_axis ¶ Vector pointing down the z-axis of the bone. (readonly) bl_system_properties_get ( * , do_create = False ) ¶ DEBUG ONLY. Internal access to runtime-defined RNA data storage, intended solely for testing and debugging purposes. Do not access it in regular scripting work, and in particular, do not assume that it contains writable data Parameters : do_create ( boolean , ( optional ) ) – Ensure that system properties are created if they do not exist yet Returns : The system properties root container, or None if there are no system properties stored in this data yet, and its creation was not requested Return type : PropertyGroup evaluate_envelope ( point ) ¶ Calculate bone envelope at given point Parameters : point ( mathutils.Vector of 3 items in [-inf, inf]) – Point, Position in 3d space to evaluate Returns : Factor, Envelope factor Return type : float in [-inf, inf] convert_local_to_pose ( matrix , matrix_local , * , parent_matrix = ((0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0)) , parent_matrix_local = ((0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0), (0.0, 0.0, 0.0, 0.0)) , invert = False ) ¶ Transform a matrix from Local to Pose space (or back), taking into account options like Inherit Scale and Local Location. Unlike Object.convert_space, this uses custom rest and pose matrices provided by the caller. If the parent matrices are omitted, the bone is assumed to have no parent. Parameters : matrix ( mathutils.Matrix of 4 * 4 items in [-inf, inf]) – The matrix to transform matrix_local ( mathutils.Matrix of 4 * 4 items in [-inf, inf]) – The custom rest matrix of this bone (Bone.matrix_local) parent_matrix ( mathutils.Matrix of 4 * 4 items in [-inf, inf], (optional)) – The custom pose matrix of the parent bone (PoseBone.matrix) parent_matrix_local ( mathutils.Matrix of 4 * 4 items in [-inf, inf], (optional)) – The custom rest matrix of the parent bone (Bone.matrix_local) invert ( boolean , ( optional ) ) – Convert from Pose to Local space Returns : The transformed matrix Return type : mathutils.Matrix of 4 * 4 items in [-inf, inf] This method enables conversions between Local and Pose space for bones in the middle of updating the armature without having to update dependencies after each change, by manually carrying updated matrices in a recursive walk. def set_pose_matrices ( obj , matrix_map ): "Assign pose space matrices of all bones at once, ignoring constraints." def rec ( pbone , parent_matrix ): if pbone . name in matrix_map : matrix = matrix_map [ pbone . name ] # # Instead of: # pbone.matrix = matrix # bpy.context.view_layer.update() # Compute and assign local matrix, using the new parent matrix. if pbone . parent : pbone . matrix_basis = pbone . bone . convert_local_to_pose ( matrix , pbone . bone . matrix_local , parent_matrix = parent_matrix , parent_matrix_local = pbone . parent . bone . matrix_local , invert = True ) else : pbone . matrix_basis = pbone . bone . convert_local_to_pose ( matrix , pbone . bone . matrix_local , invert = True ) else : # Compute the updated pose matrix from local and new parent matrix. if pbone . parent : matrix = pbone . bone . convert_local_to_pose ( pbone . matrix_basis , pbone . bone . matrix_local , parent_matrix = parent_matrix , parent_matrix_local = pbone . parent . bone . matrix_local , ) else : matrix = pbone . bone . convert_local_to_pose ( pbone . matrix_basis , pbone . bone . matrix_local , ) # Recursively process children, passing the new matrix through. for child in pbone . children : rec ( child , matrix ) # Scan all bone trees from their roots. for pbone in obj . pose . bones : if not pbone . parent : rec ( pbone , None ) classmethod MatrixFromAxisRoll ( axis , roll ) ¶ Convert the axis + roll representation to a matrix Parameters : axis ( mathutils.Vector of 3 items in [-inf, inf], (never None)) – The main axis of the bone (tail - head) roll ( float in [ -inf , inf ] ) – The roll of the bone Returns : The resulting orientation matrix Return type : mathutils.Matrix of 3 * 3 items in [-inf, inf] classmethod AxisRollFromMatrix ( matrix , * , axis = (0.0, 0.0, 0.0) ) ¶ Convert a rotational matrix to the axis + roll representation. Note that the resulting value of the roll may not be as expected if the matrix has shear or negative determinant. Parameters : matrix ( mathutils.Matrix of 3 * 3 items in [-inf, inf], (never None)) – The orientation matrix of the bone axis ( float array of 3 items in [ -inf , inf ] , ( optional ) ) – The optional override for the axis (finds closest approximation for the matrix) Returns : result_axis , The main axis of the bone, mathutils.Vector of 3 items in [-inf, inf] result_roll , The roll of the bone, float in [-inf, inf] Return type : ( mathutils.Vector of 3 items in [-inf, inf], float in [-inf, inf]) parent_index ( parent_test ) ¶ The same as ‘bone in other_bone.parent_recursive’ but saved generating a list. translate ( vec ) ¶ Utility function to add vec to the head and tail of this bone. classmethod bl_rna_get_subclass ( id , default = None , / ) ¶ Parameters : id ( str ) – 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 ( str ) – The RNA type identifier. Returns : The class or default when not found. Return type : type Inherited Properties ¶ bpy_struct.id_data Inherited Functions ¶ bpy_struct.as_pointer bpy_struct.driver_add bpy_struct.driver_remove bpy_struct.get bpy_struct.id_properties_clear bpy_struct.id_properties_ensure bpy_struct.id_properties_ui bpy_struct.is_property_hidden bpy_struct.is_property_overridable_library bpy_struct.is_property_readonly bpy_struct.is_property_set bpy_struct.items bpy_struct.keyframe_delete bpy_struct.keyframe_insert bpy_struct.keys bpy_struct.path_from_id bpy_struct.path_from_module bpy_struct.path_resolve bpy_struct.pop bpy_struct.property_overridable_library_set bpy_struct.property_unset bpy_struct.rna_ancestors bpy_struct.type_recast bpy_struct.values References ¶ bpy.context.active_bone bpy.context.bone Armature.bones ArmatureBones.active Bone.bbone_custom_handle_end Bone.bbone_custom_handle_start Bone.children Bone.parent BoneCollection.bones PoseBone.bone Next BoneCollection(bpy_struct) Previous BoidState(bpy_struct) Copyright &#169; Blender Authors Made with Furo Report issue on this page On this page Bone(bpy_struct) Bone Bone.bbone_curveinx Bone.bbone_curveinz Bone.bbone_curveoutx Bone.bbone_curveoutz Bone.bbone_custom_handle_end Bone.bbone_custom_handle_start Bone.bbone_easein Bone.bbone_easeout Bone.bbone_handle_type_end Bone.bbone_handle_type_start Bone.bbone_handle_use_ease_end Bone.bbone_handle_use_ease_start Bone.bbone_handle_use_scale_end Bone.bbone_handle_use_scale_start Bone.bbone_mapping_mode Bone.bbone_rollin Bone.bbone_rollout Bone.bbone_scalein Bone.bbone_scaleout Bone.bbone_segments Bone.bbone_x Bone.bbone_z Bone.children Bone.collections Bone.color Bone.display_type Bone.envelope_distance Bone.envelope_weight Bone.head Bone.head_local Bone.head_radius Bone.hide Bone.hide_select Bone.inherit_scale Bone.length Bone.matrix Bone.matrix_local Bone.name Bone.parent Bone.show_wire Bone.tail Bone.tail_local Bone.tail_radius Bone.use_connect Bone.use_cyclic_offset Bone.use_deform Bone.use_endroll_as_inroll Bone.use_envelope_multiply Bone.use_inherit_rotation Bone.use_local_location Bone.use_relative_parent Bone.use_scale_easing Bone.basename Bone.center Bone.children_recursive Bone.children_recursive_basename Bone.parent_recursive Bone.vector Bone.x_axis Bone.y_axis Bone.z_axis Bone.bl_system_properties_get() Bone.evaluate_envelope() Bone.convert_local_to_pose() Bone.MatrixFromAxisRoll() Bone.AxisRollFromMatrix() Bone.parent_index() Bone.translate() Bone.bl_rna_get_subclass() Bone.bl_rna_get_subclass_py() Inherited Properties Inherited Functions References