Blender V5.3
blender::bke::bArmature_Runtime Struct Reference

#include <BKE_armature.hh>

Public Member Functions

implementations of DNA struct C++ methods.
void bones_tag_rebuild ()
bool is_bones_array_valid () const

Public Attributes

int active_collection_index = 0
BoneCollection * active_collection = nullptr
Array< Bone * > bones
uint64_t bones_generation_count = 0
Mutex bones_mutex

Detailed Description

Definition at line 730 of file BKE_armature.hh.

Member Function Documentation

◆ bones_tag_rebuild()

void blender::bke::bArmature_Runtime::bones_tag_rebuild ( )

Clear the bones array, ensuring it is rebuilt on its next use.

Definition at line 3544 of file blenkernel/intern/armature.cc.

References bones.

Referenced by blender::ED_armature_from_edit().

◆ is_bones_array_valid()

bool blender::bke::bArmature_Runtime::is_bones_array_valid ( ) const

Return whether the bones array has bones (true), or whether it needs rebuilding (false).

Note that this returns 'invalid' when the Armature has no bones. This is because the bones array is only used to obtain a bone pointer by index, which means it's only valid to be used when there actually are bones.

Definition at line 3549 of file blenkernel/intern/armature.cc.

References bones.

Referenced by blender::BKE_pose_ensure_bone_indices(), blender::rebuild_bone_array(), and blender::rebuild_pose_bone_indices().

Member Data Documentation

◆ active_collection

◆ active_collection_index

◆ bones

Array<Bone *> blender::bke::bArmature_Runtime::bones

Indexable storage for bones. The bone hierarchy is stored depth-first, so a bone is followed by its children.

Used by bPoseChan::bone_get() to obtain a bone pointer by index.

Definition at line 746 of file BKE_armature.hh.

Referenced by bones_tag_rebuild(), is_bones_array_valid(), blender::rebuild_bone_array(), and blender::bke::tests::TEST_F().

◆ bones_generation_count

◆ bones_mutex

Mutex blender::bke::bArmature_Runtime::bones_mutex

Mutex to protect the bones and bones_generation_count fields.

This is used when regenerating the bones array, to ensure only a single thread does this. Read access to the bones array is not protected. So far this has worked well; it's not guaranteed that there won't be a race condition, though.

Definition at line 755 of file BKE_armature.hh.

Referenced by blender::rebuild_bone_array().


The documentation for this struct was generated from the following files: