Blender V5.0
DNA_armature_types.h File Reference
#include "DNA_ID.h"
#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_userdef_types.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Classes

struct  BoneColor
struct  Bone_Runtime
struct  Bone
struct  bArmature_Runtime
struct  bArmature
struct  BoneCollection
struct  BoneCollectionMember
struct  BoneCollectionReference

Macros

#define MAXBONENAME   64

Typedefs

typedef struct BoneColor BoneColor
typedef struct Bone_Runtime Bone_Runtime
typedef struct Bone Bone
typedef struct bArmature_Runtime bArmature_Runtime
typedef struct bArmature bArmature
typedef struct BoneCollection BoneCollection
typedef struct BoneCollectionMember BoneCollectionMember
typedef struct BoneCollectionReference BoneCollectionReference
typedef enum eArmature_Flag eArmature_Flag
typedef enum eArmature_Drawtype eArmature_Drawtype
typedef enum eArmature_DeformFlag eArmature_DeformFlag
typedef enum eBone_Flag eBone_Flag
typedef enum eBone_InheritScaleMode eBone_InheritScaleMode
typedef enum eBone_BBoneHandleType eBone_BBoneHandleType
typedef enum eBone_BBoneMappingMode eBone_BBoneMappingMode
typedef enum eBone_BBoneFlag eBone_BBoneFlag
typedef enum eBone_BBoneHandleFlag eBone_BBoneHandleFlag
typedef enum eBoneCollection_Flag eBoneCollection_Flag

Enumerations

enum  eArmature_Flag {
  ARM_RESTPOS = (1 << 0) , ARM_FLAG_UNUSED_1 = (1 << 1) , ARM_DRAWAXES = (1 << 2) , ARM_DRAWNAMES = (1 << 3) ,
  ARM_DRAW_RELATION_FROM_HEAD = (1 << 5) , ARM_BCOLL_SOLO_ACTIVE = (1 << 6) , ARM_FLAG_UNUSED_7 = (1 << 7) , ARM_MIRROR_EDIT = (1 << 8) ,
  ARM_FLAG_UNUSED_9 = (1 << 9) , ARM_NO_CUSTOM = (1 << 10) , ARM_COL_CUSTOM = (1 << 11) , ARM_FLAG_UNUSED_12 = (1 << 12) ,
  ARM_DS_EXPAND = (1 << 13) , ARM_HAS_VIZ_DEPS = (1 << 14)
}
enum  eArmature_Drawtype {
  ARM_DRAW_TYPE_ARMATURE_DEFINED = -1 , ARM_DRAW_TYPE_OCTA = 0 , ARM_DRAW_TYPE_STICK = 1 , ARM_DRAW_TYPE_B_BONE = 2 ,
  ARM_DRAW_TYPE_ENVELOPE = 3 , ARM_DRAW_TYPE_WIRE = 4
}
enum  eArmature_DeformFlag { ARM_DEF_VGROUP = (1 << 0) , ARM_DEF_ENVELOPE = (1 << 1) , ARM_DEF_QUATERNION = (1 << 2) , ARM_DEF_INVERT_VGROUP = (1 << 4) }
enum  eBone_Flag {
  BONE_SELECTED = (1 << 0) , BONE_ROOTSEL = (1 << 1) , BONE_TIPSEL = (1 << 2) , BONE_TRANSFORM = (1 << 3) ,
  BONE_CONNECTED = (1 << 4) , BONE_HIDDEN_P = (1 << 6) , BONE_DONE = (1 << 7) , BONE_DRAW_ACTIVE = (1 << 8) ,
  BONE_HINGE = (1 << 9) , BONE_HIDDEN_A = (1 << 10) , BONE_MULT_VG_ENV = (1 << 11) , BONE_NO_DEFORM = (1 << 12) ,
  BONE_DRAWWIRE = (1 << 17) , BONE_NO_CYCLICOFFSET = (1 << 18) , BONE_EDITMODE_LOCKED = (1 << 19) , BONE_UNSELECTABLE = (1 << 21) ,
  BONE_NO_LOCAL_LOCATION = (1 << 22) , BONE_RELATIVE_PARENTING = (1 << 23) , BONE_TRANSFORM_MIRROR = (1 << 25) , BONE_DRAW_LOCKED_WEIGHT = (1 << 26)
}
enum  eBone_InheritScaleMode {
  BONE_INHERIT_SCALE_FULL = 0 , BONE_INHERIT_SCALE_FIX_SHEAR = 1 , BONE_INHERIT_SCALE_AVERAGE = 2 , BONE_INHERIT_SCALE_NONE = 3 ,
  BONE_INHERIT_SCALE_NONE_LEGACY = 4 , BONE_INHERIT_SCALE_ALIGNED = 5
}
enum  eBone_BBoneHandleType { BBONE_HANDLE_AUTO = 0 , BBONE_HANDLE_ABSOLUTE = 1 , BBONE_HANDLE_RELATIVE = 2 , BBONE_HANDLE_TANGENT = 3 }
enum  eBone_BBoneMappingMode { BBONE_MAPPING_STRAIGHT = 0 , BBONE_MAPPING_CURVED = 1 }
enum  eBone_BBoneFlag { BBONE_ADD_PARENT_END_ROLL = (1 << 0) , BBONE_SCALE_EASING = (1 << 1) }
enum  eBone_BBoneHandleFlag {
  BBONE_HANDLE_SCALE_X = (1 << 0) , BBONE_HANDLE_SCALE_Y = (1 << 1) , BBONE_HANDLE_SCALE_Z = (1 << 2) , BBONE_HANDLE_SCALE_EASE = (1 << 3) ,
  BBONE_HANDLE_SCALE_ANY
}
enum  eBoneCollection_Flag {
  BONE_COLLECTION_VISIBLE = (1 << 0) , BONE_COLLECTION_SELECTABLE = (1 << 1) , BONE_COLLECTION_OVERRIDE_LIBRARY_LOCAL = (1 << 2) , BONE_COLLECTION_ANCESTORS_VISIBLE = (1 << 3) ,
  BONE_COLLECTION_SOLO = (1 << 4) , BONE_COLLECTION_EXPANDED = (1 << 5)
}

Macro Definition Documentation

◆ MAXBONENAME

Typedef Documentation

◆ bArmature

typedef struct bArmature bArmature

◆ bArmature_Runtime

typedef struct bArmature_Runtime bArmature_Runtime

◆ Bone

typedef struct Bone Bone

◆ Bone_Runtime

typedef struct Bone_Runtime Bone_Runtime

◆ BoneCollection

typedef struct BoneCollection BoneCollection

Collection of Bones within an Armature.

BoneCollections are owned by their Armature, and cannot be shared between different armatures.

Bones can be in more than one collection at a time.

Selectability and visibility of bones are determined by OR-ing the collection flags.

◆ BoneCollectionMember

typedef struct BoneCollectionMember BoneCollectionMember

Membership relation of a bone with a bone collection.

◆ BoneCollectionReference

typedef struct BoneCollectionReference BoneCollectionReference

Membership relation of a bone with its collections.

This is only bone-runtime data for easy lookups, the actual membership is stored on the bArmature in BoneCollectionMember structs.

◆ BoneColor

typedef struct BoneColor BoneColor

◆ eArmature_DeformFlag

◆ eArmature_Drawtype

◆ eArmature_Flag

◆ eBone_BBoneFlag

◆ eBone_BBoneHandleFlag

◆ eBone_BBoneHandleType

◆ eBone_BBoneMappingMode

◆ eBone_Flag

◆ eBone_InheritScaleMode

◆ eBoneCollection_Flag

Enumeration Type Documentation

◆ eArmature_DeformFlag

Enumerator
ARM_DEF_VGROUP 
ARM_DEF_ENVELOPE 
ARM_DEF_QUATERNION 
ARM_DEF_INVERT_VGROUP 

Definition at line 405 of file DNA_armature_types.h.

◆ eArmature_Drawtype

Enumerator
ARM_DRAW_TYPE_ARMATURE_DEFINED 
ARM_DRAW_TYPE_OCTA 
ARM_DRAW_TYPE_STICK 
ARM_DRAW_TYPE_B_BONE 
ARM_DRAW_TYPE_ENVELOPE 
ARM_DRAW_TYPE_WIRE 

Definition at line 395 of file DNA_armature_types.h.

◆ eArmature_Flag

Enumerator
ARM_RESTPOS 
ARM_FLAG_UNUSED_1 

XRAY is here only for backwards converting

ARM_DRAWAXES 
ARM_DRAWNAMES 
ARM_DRAW_RELATION_FROM_HEAD 

Position of the parent-child relation lines on the bone (cleared = drawn from the tail, set = drawn from the head). Only controls the parent side of the line; the child side is always drawn to the head of the bone.

ARM_BCOLL_SOLO_ACTIVE 

Whether any bone collection is marked with the 'solo' flag. When this is the case, bone collection visibility flags don't matter any more, and only ones that have their 'solo' flag set will be visible.

See also
eBoneCollection_Flag::BONE_COLLECTION_SOLO
ARM_FLAG_UNUSED_7 
ARM_MIRROR_EDIT 
ARM_FLAG_UNUSED_9 
ARM_NO_CUSTOM 

Made option negative, for backwards compatibility.

ARM_COL_CUSTOM 

Draw custom colors.

ARM_FLAG_UNUSED_12 

When ghosting, only show selected bones (this should belong to ghostflag instead).

ARM_DS_EXPAND 

Dope-sheet channel is expanded

ARM_HAS_VIZ_DEPS 

Other objects are used for visualizing various states (hack for efficient updates).

Definition at line 361 of file DNA_armature_types.h.

◆ eBone_BBoneFlag

Enumerator
BBONE_ADD_PARENT_END_ROLL 

Add the parent Out roll to the In roll.

BBONE_SCALE_EASING 

Multiply B-Bone easing values with Scale Length.

Definition at line 532 of file DNA_armature_types.h.

◆ eBone_BBoneHandleFlag

Enumerator
BBONE_HANDLE_SCALE_X 

Use handle bone scaling for scale X.

BBONE_HANDLE_SCALE_Y 

Use handle bone scaling for scale Y (length).

BBONE_HANDLE_SCALE_Z 

Use handle bone scaling for scale Z.

BBONE_HANDLE_SCALE_EASE 

Use handle bone scaling for easing.

BBONE_HANDLE_SCALE_ANY 

Is handle scale required?

Definition at line 540 of file DNA_armature_types.h.

◆ eBone_BBoneHandleType

Enumerator
BBONE_HANDLE_AUTO 
BBONE_HANDLE_ABSOLUTE 
BBONE_HANDLE_RELATIVE 
BBONE_HANDLE_TANGENT 

Definition at line 518 of file DNA_armature_types.h.

◆ eBone_BBoneMappingMode

Enumerator
BBONE_MAPPING_STRAIGHT 
BBONE_MAPPING_CURVED 

Definition at line 526 of file DNA_armature_types.h.

◆ eBone_Flag

enum eBone_Flag
Enumerator
BONE_SELECTED 

Bone selection, must only be set when the bone is not hidden (BONE_HIDDEN_A / BONE_HIDDEN_P flags must not be enabled as well).

However the bone may not be visible to the user since the bones collection may be hidden. In most cases blender::animrig::bone_is_visible or blender::animrig::bone_is_visible should be used to check if the bone is visible to the user before operating on them.

BONE_ROOTSEL 
BONE_TIPSEL 
BONE_TRANSFORM 

Used instead of BONE_SELECTED during transform (clear before use)

BONE_CONNECTED 

When bone has a parent, connect head of bone to parent's tail.

BONE_HIDDEN_P 

Hidden Bones when drawing PoseChannels. When set BONE_SELECTED must be cleared.

BONE_DONE 

For detecting cyclic dependencies

BONE_DRAW_ACTIVE 

active is on mouse clicks only - deprecated, ONLY USE FOR DRAWING

BONE_HINGE 

No parent rotation or scale

BONE_HIDDEN_A 

Hidden Bones when drawing Armature edit-mode. When set, selection flags (BONE_SELECTED, BONE_ROOTSEL & BONE_TIPSEL) must be cleared.

BONE_MULT_VG_ENV 

multiplies vgroup with envelope

BONE_NO_DEFORM 

bone doesn't deform geometry

BONE_DRAWWIRE 

bone should be drawn as OB_WIRE, regardless of draw-types of view+armature

BONE_NO_CYCLICOFFSET 

when no parent, bone will not get cyclic offset

BONE_EDITMODE_LOCKED 

bone transforms are locked in EditMode

BONE_UNSELECTABLE 

bone cannot be selected

BONE_NO_LOCAL_LOCATION 

bone location is in armature space

BONE_RELATIVE_PARENTING 

object child will use relative transform (like deform)

BONE_TRANSFORM_MIRROR 

this bone was transformed by the mirror function

BONE_DRAW_LOCKED_WEIGHT 

this bone is associated with a locked vertex group, ONLY USE FOR DRAWING

Definition at line 427 of file DNA_armature_types.h.

◆ eBone_InheritScaleMode

Enumerator
BONE_INHERIT_SCALE_FULL 
BONE_INHERIT_SCALE_FIX_SHEAR 
BONE_INHERIT_SCALE_AVERAGE 
BONE_INHERIT_SCALE_NONE 
BONE_INHERIT_SCALE_NONE_LEGACY 
BONE_INHERIT_SCALE_ALIGNED 

Definition at line 502 of file DNA_armature_types.h.

◆ eBoneCollection_Flag

#BoneCollection.flag

Enumerator
BONE_COLLECTION_VISIBLE 
BONE_COLLECTION_SELECTABLE 
BONE_COLLECTION_OVERRIDE_LIBRARY_LOCAL 
BONE_COLLECTION_ANCESTORS_VISIBLE 

Set when all ancestors are visible.

This would actually be a runtime flag, but bone collections don't have a runtime struct yet, and the addition of one more flag doesn't seem worth the effort.

BONE_COLLECTION_SOLO 

Whether this bone collection is marked as 'solo'.

If no bone collections have this flag set, visibility is determined by BONE_COLLECTION_VISIBLE.

If there is any bone collection with the BONE_COLLECTION_SOLO flag enabled, all bone collections are effectively hidden, except other collections with this flag enabled.

See also
eArmature_Flag::ARM_BCOLL_SOLO_ACTIVE
BONE_COLLECTION_EXPANDED 

Definition at line 557 of file DNA_armature_types.h.