Blender  V3.3
Macros | Typedefs | Enumerations | Functions
ED_armature.h File Reference
#include <stdbool.h>
#include "BLI_listbase.h"

Go to the source code of this file.

Macros

#define BONESEL_ROOT   (1u << 29)
 
#define BONESEL_TIP   (1u << 30)
 
#define BONESEL_BONE   (1u << 31)
 
#define BONESEL_ANY   (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE)
 
#define EBONE_VISIBLE(arm, ebone)
 
#define EBONE_SELECTABLE(arm, ebone)    (EBONE_VISIBLE(arm, ebone) && !((ebone)->flag & BONE_UNSELECTABLE))
 
#define EBONE_EDITABLE(ebone)
 
#define BONE_SELECT_PARENT   0
 
#define BONE_SELECT_CHILD   1
 
#define ARM_GROUPS_NAME   1
 
#define ARM_GROUPS_ENVELOPE   2
 
#define ARM_GROUPS_AUTO   3
 

Typedefs

typedef enum ePosePathCalcRange ePosePathCalcRange
 

Enumerations

enum  ePosePathCalcRange { POSE_PATH_CALC_RANGE_CURRENT_FRAME , POSE_PATH_CALC_RANGE_CHANGED , POSE_PATH_CALC_RANGE_FULL }
 

Functions

struct EditBoneED_armature_ebone_add (struct bArmature *arm, const char *name)
 
struct EditBoneED_armature_ebone_add_primitive (struct Object *obedit_arm, float length, bool view_aligned)
 
float ED_armature_ebone_roll_to_vector (const struct EditBone *bone, const float align_axis[3], bool axis_only)
 
void ED_armature_origin_set (struct Main *bmain, struct Object *ob, const float cursor[3], int centermode, int around)
 
void ED_armature_edit_transform (struct bArmature *arm, const float mat[4][4], bool do_props)
 
void ED_armature_transform (struct bArmature *arm, const float mat[4][4], bool do_props)
 
void ED_armature_ebone_unique_name (struct ListBase *ebones, char *name, struct EditBone *bone)
 
void ED_armature_bone_rename (struct Main *bmain, struct bArmature *arm, const char *oldnamep, const char *newnamep)
 
void ED_armature_bones_flip_names (struct Main *bmain, struct bArmature *arm, struct ListBase *bones_names, bool do_strip_numbers)
 
void ED_operatortypes_armature (void)
 
void ED_operatormacros_armature (void)
 
void ED_keymap_armature (struct wmKeyConfig *keyconf)
 
int ED_armature_join_objects_exec (struct bContext *C, struct wmOperator *op)
 
struct BaseED_armature_base_and_ebone_from_select_buffer (struct Base **bases, uint bases_len, unsigned int select_id, struct EditBone **r_ebone)
 
struct ObjectED_armature_object_and_ebone_from_select_buffer (struct Object **objects, uint objects_len, unsigned int select_id, struct EditBone **r_ebone)
 
struct BaseED_armature_base_and_pchan_from_select_buffer (struct Base **bases, uint bases_len, unsigned int select_id, struct bPoseChannel **r_pchan)
 
struct BaseED_armature_base_and_bone_from_select_buffer (struct Base **bases, uint bases_len, unsigned int select_id, struct Bone **r_bone)
 
bool ED_armature_edit_deselect_all (struct Object *obedit)
 
bool ED_armature_edit_deselect_all_visible (struct Object *obedit)
 
bool ED_armature_edit_deselect_all_multi_ex (struct Base **bases, uint bases_len)
 
bool ED_armature_edit_deselect_all_visible_multi_ex (struct Base **bases, uint bases_len)
 
bool ED_armature_edit_deselect_all_visible_multi (struct bContext *C)
 
bool ED_armature_edit_select_pick_bone (struct bContext *C, struct Base *basact, struct EditBone *ebone, int selmask, const struct SelectPick_Params *params)
 
bool ED_armature_edit_select_pick (struct bContext *C, const int mval[2], const struct SelectPick_Params *params)
 
bool ED_armature_edit_select_op_from_tagged (struct bArmature *arm, int sel_op)
 
void ED_object_vgroup_calc_from_armature (struct ReportList *reports, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Object *par, int mode, bool mirror)
 
void ED_armature_undosys_type (struct UndoType *ut)
 
void ED_armature_edit_sync_selection (struct ListBase *edbo)
 
void ED_armature_edit_validate_active (struct bArmature *arm)
 
void ED_armature_edit_refresh_layer_used (struct bArmature *arm)
 
void ED_armature_ebone_remove_ex (struct bArmature *arm, struct EditBone *exBone, bool clear_connected)
 
void ED_armature_ebone_remove (struct bArmature *arm, struct EditBone *exBone)
 
bool ED_armature_ebone_is_child_recursive (struct EditBone *ebone_parent, struct EditBone *ebone_child)
 
struct EditBoneED_armature_ebone_find_shared_parent (struct EditBone *ebone_child[], unsigned int ebone_child_tot)
 
void ED_armature_ebone_to_mat3 (struct EditBone *ebone, float r_mat[3][3])
 
void ED_armature_ebone_to_mat4 (struct EditBone *ebone, float r_mat[4][4])
 
void ED_armature_ebone_from_mat3 (struct EditBone *ebone, const float mat[3][3])
 
void ED_armature_ebone_from_mat4 (struct EditBone *ebone, const float mat[4][4])
 
struct EditBoneED_armature_ebone_find_name (const struct ListBase *edbo, const char *name)
 
struct EditBoneED_armature_ebone_get_mirrored (const struct ListBase *edbo, struct EditBone *ebo)
 
void ED_armature_ebone_transform_mirror_update (struct bArmature *arm, struct EditBone *ebo, bool check_select)
 
void ED_armature_edit_transform_mirror_update (struct Object *obedit)
 
void ED_armature_from_edit (struct Main *bmain, struct bArmature *arm)
 
void ED_armature_to_edit (struct bArmature *arm)
 
void ED_armature_edit_free (struct bArmature *arm)
 
void ED_armature_ebone_listbase_temp_clear (struct ListBase *lb)
 
void ED_armature_ebone_listbase_free (struct ListBase *lb, bool do_id_user)
 
void ED_armature_ebone_listbase_copy (struct ListBase *lb_dst, struct ListBase *lb_src, bool do_id_user)
 
int ED_armature_ebone_selectflag_get (const struct EditBone *ebone)
 
void ED_armature_ebone_selectflag_set (struct EditBone *ebone, int flag)
 
void ED_armature_ebone_select_set (struct EditBone *ebone, bool select)
 
void ED_armature_ebone_selectflag_enable (struct EditBone *ebone, int flag)
 
void ED_armature_ebone_selectflag_disable (struct EditBone *ebone, int flag)
 
struct ObjectED_pose_object_from_context (struct bContext *C)
 
bool ED_object_posemode_exit_ex (struct Main *bmain, struct Object *ob)
 
bool ED_object_posemode_exit (struct bContext *C, struct Object *ob)
 
bool ED_object_posemode_enter_ex (struct Main *bmain, struct Object *ob)
 
bool ED_object_posemode_enter (struct bContext *C, struct Object *ob)
 
void ED_pose_recalculate_paths (struct bContext *C, struct Scene *scene, struct Object *ob, ePosePathCalcRange range)
 
bool ED_armature_pose_select_pick_bone (struct ViewLayer *view_layer, struct View3D *v3d, struct Object *ob, struct Bone *bone, const struct SelectPick_Params *params)
 
bool ED_armature_pose_select_pick_with_buffer (struct ViewLayer *view_layer, struct View3D *v3d, struct Base *base, const struct GPUSelectResult *buffer, short hits, const struct SelectPick_Params *params, bool do_nearest)
 
void ED_armature_pose_select_in_wpaint_mode (struct ViewLayer *view_layer, struct Base *base_select)
 
bool ED_pose_deselect_all_multi_ex (struct Base **bases, uint bases_len, int select_mode, bool ignore_visibility)
 
bool ED_pose_deselect_all_multi (struct bContext *C, int select_mode, bool ignore_visibility)
 
bool ED_pose_deselect_all (struct Object *ob, int select_mode, bool ignore_visibility)
 
void ED_pose_bone_select_tag_update (struct Object *ob)
 
void ED_pose_bone_select (struct Object *ob, struct bPoseChannel *pchan, bool select)
 
void ED_mesh_deform_bind_callback (struct Object *object, struct MeshDeformModifierData *mmd, struct Mesh *cagemesh, float *vertexcos, int verts_num, float cagemat[4][4])
 
struct PoseBackupED_pose_backup_create_selected_bones (const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT
 
struct PoseBackupED_pose_backup_create_all_bones (const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT
 
bool ED_pose_backup_is_selection_relevant (const struct PoseBackup *pose_backup)
 
void ED_pose_backup_restore (const struct PoseBackup *pbd)
 
void ED_pose_backup_free (struct PoseBackup *pbd)
 

Macro Definition Documentation

◆ ARM_GROUPS_AUTO

#define ARM_GROUPS_AUTO   3

Definition at line 200 of file ED_armature.h.

◆ ARM_GROUPS_ENVELOPE

#define ARM_GROUPS_ENVELOPE   2

Definition at line 199 of file ED_armature.h.

◆ ARM_GROUPS_NAME

#define ARM_GROUPS_NAME   1

Definition at line 198 of file ED_armature.h.

◆ BONE_SELECT_CHILD

#define BONE_SELECT_CHILD   1

Definition at line 62 of file ED_armature.h.

◆ BONE_SELECT_PARENT

#define BONE_SELECT_PARENT   0

Definition at line 61 of file ED_armature.h.

◆ BONESEL_ANY

#define BONESEL_ANY   (BONESEL_TIP | BONESEL_ROOT | BONESEL_BONE)

Definition at line 44 of file ED_armature.h.

◆ BONESEL_BONE

#define BONESEL_BONE   (1u << 31)

Definition at line 43 of file ED_armature.h.

◆ BONESEL_ROOT

#define BONESEL_ROOT   (1u << 29)

Definition at line 41 of file ED_armature.h.

◆ BONESEL_TIP

#define BONESEL_TIP   (1u << 30)

Definition at line 42 of file ED_armature.h.

◆ EBONE_EDITABLE

#define EBONE_EDITABLE (   ebone)
Value:
(((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)))
#define CHECK_TYPE_INLINE(val, type)
@ BONE_SELECTED
@ BONE_EDITMODE_LOCKED

Definition at line 55 of file ED_armature.h.

◆ EBONE_SELECTABLE

#define EBONE_SELECTABLE (   arm,
  ebone 
)     (EBONE_VISIBLE(arm, ebone) && !((ebone)->flag & BONE_UNSELECTABLE))

Definition at line 52 of file ED_armature.h.

◆ EBONE_VISIBLE

#define EBONE_VISIBLE (   arm,
  ebone 
)
Value:
CHECK_TYPE_INLINE(ebone, EditBone *), \
(((arm)->layer & (ebone)->layer) && !((ebone)->flag & BONE_HIDDEN_A)))
@ BONE_HIDDEN_A

Definition at line 47 of file ED_armature.h.

Typedef Documentation

◆ ePosePathCalcRange

Corresponds to eAnimvizCalcRange.

Enumeration Type Documentation

◆ ePosePathCalcRange

Corresponds to eAnimvizCalcRange.

Enumerator
POSE_PATH_CALC_RANGE_CURRENT_FRAME 
POSE_PATH_CALC_RANGE_CHANGED 
POSE_PATH_CALC_RANGE_FULL 

Definition at line 294 of file ED_armature.h.

Function Documentation

◆ ED_armature_base_and_bone_from_select_buffer()

struct Base* ED_armature_base_and_bone_from_select_buffer ( struct Base **  bases,
uint  bases_len,
unsigned int  select_id,
struct Bone **  r_bone 
)

For callers that don't need the pose channel.

Definition at line 128 of file armature_select.c.

References bPoseChannel::bone, ED_armature_base_and_pchan_from_select_buffer(), and NULL.

Referenced by do_pose_box_select().

◆ ED_armature_base_and_ebone_from_select_buffer()

struct Base* ED_armature_base_and_ebone_from_select_buffer ( struct Base **  bases,
uint  bases_len,
unsigned int  select_id,
struct EditBone **  r_ebone 
)

◆ ED_armature_base_and_pchan_from_select_buffer()

struct Base* ED_armature_base_and_pchan_from_select_buffer ( struct Base **  bases,
uint  bases_len,
unsigned int  select_id,
struct bPoseChannel **  r_pchan 
)

◆ ED_armature_bone_rename()

void ED_armature_bone_rename ( struct Main bmain,
struct bArmature arm,
const char *  oldnamep,
const char *  newnamep 
)

Bone Rename (called by UI for renaming a bone). Seems messy, but that's what you get with not using pointers but channel names :).

Warning
make sure the original bone was not renamed yet!

Definition at line 136 of file armature_naming.c.

References blender::compositor::area(), bScreen::areabase, BKE_animdata_fix_paths_rename_all(), BKE_armature_find_bone_name(), BKE_modifiers_uses_armature(), BKE_object_defgroup_find_name(), BKE_object_supports_vertex_groups(), BKE_pose_channel_find_name(), BKE_pose_channels_is_valid(), BLI_assert, BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_remove(), BLI_strncpy(), UVWarpModifierData::bone_dst, UVWarpModifierData::bone_src, bArmature::bonehash, bPose::chanbase, bPose::chanhash, constraint_bone_name_fix(), bPoseChannel::constraints, Object::constraints, Object::data, DEG_id_tag_update(), Camera::dof, ed_armature_bone_unique_name(), ED_armature_ebone_find_name(), ED_armature_ebone_unique_name(), bArmature::edbo, eGpencilModifierType_Armature, eGpencilModifierType_Hook, eModifierType_Hook, eModifierType_UVWarp, ListBase::first, CameraDOFSettings::focus_object, CameraDOFSettings::focus_subtarget, Object::greasepencil_modifiers, bArmature::id, Camera::id, Object::id, bScreen::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, if(), bGPdata::layers, LISTBASE_FOREACH, MAXBONENAME, Object::modifiers, EditBone::name, bPoseChannel::name, Bone::name, bDeformGroup::name, bPoseChannel::next, ID::next, ModifierData::next, SpaceLink::next, NULL, OB_CAMERA, View3D::ob_center, View3D::ob_center_bone, OB_GPENCIL, HookGpencilModifierData::object, ArmatureGpencilModifierData::object, HookModifierData::object, UVWarpModifierData::object_dst, UVWarpModifierData::object_src, Main::objects, PARBONE, Object::parent, Object::parsubstr, Object::partype, Object::pose, Main::screens, SPACE_VIEW3D, SpaceLink::spacetype, STREQ, STREQLEN, HookGpencilModifierData::subtarget, HookModifierData::subtarget, ModifierData::type, and Object::type.

Referenced by armature_autoside_names_exec(), ED_armature_bones_flip_names(), namebutton_fn(), and pose_autoside_names_exec().

◆ ED_armature_bones_flip_names()

void ED_armature_bones_flip_names ( struct Main bmain,
struct bArmature arm,
struct ListBase bones_names,
bool  do_strip_numbers 
)

Renames (by flipping) all selected bones at once.

This way if we are flipping related bones (e.g., Bone.L, Bone.R) at the same time all the bones are safely renamed, without conflicting with each other.

Parameters
armArmature the bones belong to
bones_namesList of bone conflict elements (LinkData pointing to names).
do_strip_numbersif set, try to get rid of dot-numbers at end of bone names.

Definition at line 385 of file armature_naming.c.

References BLI_addtail(), BLI_string_flip_side_name(), BLI_strncpy(), ED_armature_bone_rename(), ListBase::first, LISTBASE_FOREACH, MAXBONENAME, BoneFlipNameData::name, BoneFlipNameData::name_flip, BoneFlipNameData::next, NULL, and STREQ.

Referenced by armature_flip_names_exec(), and pose_flip_names_exec().

◆ ED_armature_ebone_add()

struct EditBone* ED_armature_ebone_add ( struct bArmature arm,
const char *  name 
)

◆ ED_armature_ebone_add_primitive()

struct EditBone* ED_armature_ebone_add_primitive ( struct Object obedit_arm,
float  length,
bool  view_aligned 
)

◆ ED_armature_ebone_find_name()

struct EditBone* ED_armature_ebone_find_name ( const struct ListBase edbo,
const char *  name 
)

Return a pointer to the bone of the given name

◆ ED_armature_ebone_find_shared_parent()

struct EditBone* ED_armature_ebone_find_shared_parent ( struct EditBone ebone_child[],
unsigned int  ebone_child_tot 
)

Finds the first parent shared by ebone_child

Parameters
ebone_childChildren bones to search
ebone_child_totSize of the ebone_child array
Returns
The shared parent or NULL.

Definition at line 174 of file armature_utils.c.

References EBONE_TEMP_UINT, NULL, and EditBone::parent.

Referenced by armature_shortest_path_pick_invoke().

◆ ED_armature_ebone_from_mat3()

void ED_armature_ebone_from_mat3 ( struct EditBone ebone,
const float  mat[3][3] 
)

◆ ED_armature_ebone_from_mat4()

void ED_armature_ebone_from_mat4 ( struct EditBone ebone,
const float  mat[4][4] 
)

◆ ED_armature_ebone_get_mirrored()

struct EditBone* ED_armature_ebone_get_mirrored ( const struct ListBase edbo,
struct EditBone ebo 
)
See also
BKE_pose_channel_get_mirrored (pose-mode, matching function)

◆ ED_armature_ebone_is_child_recursive()

bool ED_armature_ebone_is_child_recursive ( struct EditBone ebone_parent,
struct EditBone ebone_child 
)

◆ ED_armature_ebone_listbase_copy()

void ED_armature_ebone_listbase_copy ( struct ListBase lb_dst,
struct ListBase lb_src,
bool  do_id_user 
)

◆ ED_armature_ebone_listbase_free()

void ED_armature_ebone_listbase_free ( struct ListBase lb,
bool  do_id_user 
)

Free's bones and their properties.

Definition at line 822 of file armature_utils.c.

References BLI_listbase_clear(), ListBase::first, IDP_FreeProperty_ex(), MEM_freeN, EditBone::next, and EditBone::prop.

Referenced by undoarm_free_data(), and undoarm_to_editarm().

◆ ED_armature_ebone_listbase_temp_clear()

void ED_armature_ebone_listbase_temp_clear ( struct ListBase lb)

◆ ED_armature_ebone_remove()

void ED_armature_ebone_remove ( struct bArmature arm,
struct EditBone exBone 
)

Definition at line 159 of file armature_utils.c.

References ED_armature_ebone_remove_ex().

Referenced by armature_delete_selected_exec().

◆ ED_armature_ebone_remove_ex()

void ED_armature_ebone_remove_ex ( struct bArmature arm,
struct EditBone exBone,
bool  clear_connected 
)
Parameters
clear_connectedWhen false caller is responsible for keeping the flag in a valid state.

Definition at line 142 of file armature_utils.c.

References BONE_CONNECTED, bone_free(), bArmature::edbo, ListBase::first, EditBone::flag, EditBone::next, and EditBone::parent.

Referenced by armature_dissolve_selected_exec(), and ED_armature_ebone_remove().

◆ ED_armature_ebone_roll_to_vector()

float ED_armature_ebone_roll_to_vector ( const struct EditBone bone,
const float  align_axis[3],
bool  axis_only 
)

Adjust bone roll to align Z axis with vector align_axis is in local space and is normalized.

◆ ED_armature_ebone_select_set()

void ED_armature_ebone_select_set ( struct EditBone ebone,
bool  select 
)

◆ ED_armature_ebone_selectflag_disable()

void ED_armature_ebone_selectflag_disable ( struct EditBone ebone,
int  flag 
)

◆ ED_armature_ebone_selectflag_enable()

void ED_armature_ebone_selectflag_enable ( struct EditBone ebone,
int  flag 
)

◆ ED_armature_ebone_selectflag_get()

int ED_armature_ebone_selectflag_get ( const struct EditBone ebone)

◆ ED_armature_ebone_selectflag_set()

void ED_armature_ebone_selectflag_set ( struct EditBone ebone,
int  flag 
)

◆ ED_armature_ebone_to_mat3()

void ED_armature_ebone_to_mat3 ( struct EditBone ebone,
float  r_mat[3][3] 
)

◆ ED_armature_ebone_to_mat4()

void ED_armature_ebone_to_mat4 ( struct EditBone ebone,
float  r_mat[4][4] 
)

◆ ED_armature_ebone_transform_mirror_update()

void ED_armature_ebone_transform_mirror_update ( struct bArmature arm,
struct EditBone ebo,
bool  check_select 
)

◆ ED_armature_ebone_unique_name()

void ED_armature_ebone_unique_name ( struct ListBase ebones,
char *  name,
struct EditBone bone 
)

Ensure the bone name is unique. If bone is already in list, pass it as argument to ignore it.

Definition at line 68 of file armature_naming.c.

References BLI_uniquename_cb(), data, DATA_, editbone_unique_check(), and EditBone::name.

Referenced by armature_extrude_exec(), armature_subdivide_exec(), duplicateEditBoneObjects(), ED_armature_bone_rename(), ED_armature_ebone_add(), and ED_armature_join_objects_exec().

◆ ED_armature_edit_deselect_all()

bool ED_armature_edit_deselect_all ( struct Object obedit)

◆ ED_armature_edit_deselect_all_multi_ex()

bool ED_armature_edit_deselect_all_multi_ex ( struct Base **  bases,
uint  bases_len 
)

◆ ED_armature_edit_deselect_all_visible()

bool ED_armature_edit_deselect_all_visible ( struct Object obedit)

◆ ED_armature_edit_deselect_all_visible_multi()

bool ED_armature_edit_deselect_all_visible_multi ( struct bContext C)

◆ ED_armature_edit_deselect_all_visible_multi_ex()

bool ED_armature_edit_deselect_all_visible_multi_ex ( struct Base **  bases,
uint  bases_len 
)

Definition at line 921 of file armature_select.c.

References ED_armature_edit_deselect_all_visible(), and Base::object.

Referenced by do_armature_box_select().

◆ ED_armature_edit_free()

void ED_armature_edit_free ( struct bArmature arm)

◆ ED_armature_edit_refresh_layer_used()

void ED_armature_edit_refresh_layer_used ( struct bArmature arm)

Update the layers_used variable after bones are moved between layer

Note
Used to be done in drawing code in 2.7, but that won't work with Copy-on-Write, as drawing uses evaluated copies.

Definition at line 73 of file armature_utils.c.

References bArmature::edbo, bArmature::layer_used, and LISTBASE_FOREACH.

Referenced by armature_bone_layers_exec(), armature_bone_primitive_add_exec(), armature_delete_selected_exec(), armature_dissolve_selected_exec(), armature_fill_bones_exec(), and separate_armature_exec().

◆ ED_armature_edit_select_op_from_tagged()

bool ED_armature_edit_select_op_from_tagged ( struct bArmature arm,
int  sel_op 
)

Perform a selection operation on elements which have been 'touched', use for lasso & border select but can be used elsewhere too.

Tagging is done via #EditBone.temp.i using: BONESEL_ROOT, BONESEL_TIP, BONESEL_BONE And optionally ignoring end-points using the BONESEL_ROOT, BONESEL_TIP right shifted 16 bits. (used when the values are clipped outside the view).

Parameters
sel_opeSelectOp type.
Note
Visibility checks must be done by the caller.

Definition at line 1220 of file armature_select.c.

References armature_edit_select_op_apply(), BONE_CONNECTED, BONE_DONE, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, BONESEL_BONE, BONESEL_ROOT, BONESEL_TIP, ED_armature_edit_sync_selection(), ED_armature_edit_validate_active(), bArmature::edbo, ELEM, LISTBASE_FOREACH, and SWAP.

Referenced by do_armature_box_select(), and do_lasso_select_armature().

◆ ED_armature_edit_select_pick()

bool ED_armature_edit_select_pick ( struct bContext C,
const int  mval[2],
const struct SelectPick_Params params 
)

◆ ED_armature_edit_select_pick_bone()

bool ED_armature_edit_select_pick_bone ( struct bContext C,
struct Base basact,
struct EditBone ebone,
int  selmask,
const struct SelectPick_Params params 
)

◆ ED_armature_edit_sync_selection()

void ED_armature_edit_sync_selection ( struct ListBase edbo)

◆ ED_armature_edit_transform()

void ED_armature_edit_transform ( struct bArmature arm,
const float  mat[4][4],
bool  do_props 
)

◆ ED_armature_edit_transform_mirror_update()

void ED_armature_edit_transform_mirror_update ( struct Object obedit)

If edit-bone (partial) selected, copy data. context; edit-mode armature, with mirror editing enabled.

Definition at line 436 of file armature_utils.c.

References Object::data, ED_armature_ebone_transform_mirror_update(), bArmature::edbo, and LISTBASE_FOREACH.

Referenced by armature_symmetrize_exec(), ED_transverts_update_obedit(), recalcData_edit_armature(), and recalcData_pose().

◆ ED_armature_edit_validate_active()

void ED_armature_edit_validate_active ( struct bArmature arm)

◆ ED_armature_from_edit()

void ED_armature_from_edit ( struct Main bmain,
struct bArmature arm 
)

Put edit-mode back in Object.

Definition at line 660 of file armature_utils.c.

References bArmature::act_bone, bArmature::act_edbone, Bone::arm_head, Bone::arm_roll, Bone::arm_tail, armature_finalize_restpose(), EditBone::bbone_flag, Bone::bbone_flag, EditBone::bbone_next, Bone::bbone_next, EditBone::bbone_next_flag, Bone::bbone_next_flag, EditBone::bbone_next_type, Bone::bbone_next_type, EditBone::bbone_prev, Bone::bbone_prev, EditBone::bbone_prev_flag, Bone::bbone_prev_flag, EditBone::bbone_prev_type, Bone::bbone_prev_type, BKE_armature_bone_hash_free(), BKE_armature_bone_hash_make(), BKE_armature_bonelist_free(), BKE_pose_rebuild(), BLI_addtail(), BLI_strncpy(), EditBone::bone, bone_free(), bArmature::bonebase, Bone::childbase, copy_v3_v3(), EditBone::curve_in_x, Bone::curve_in_x, EditBone::curve_in_z, Bone::curve_in_z, EditBone::curve_out_x, Bone::curve_out_x, EditBone::curve_out_z, Bone::curve_out_z, Object::data, DEG_id_tag_update(), EditBone::dist, Bone::dist, EditBone::ease1, Bone::ease1, EditBone::ease2, Bone::ease2, bArmature::edbo, ListBase::first, EditBone::flag, Bone::flag, G, G_DEBUG, EditBone::head, bArmature::id, Object::id, IDP_CopyProperty(), EditBone::inherit_scale_mode, Bone::inherit_scale_mode, EditBone::layer, Bone::layer, len_squared_v3v3(), MEM_callocN, EditBone::name, Bone::name, EditBone::next, ID::next, NULL, Main::objects, EditBone::parent, Bone::parent, EditBone::prop, Bone::prop, EditBone::rad_head, Bone::rad_head, EditBone::rad_tail, Bone::rad_tail, EditBone::roll, Bone::roll, EditBone::roll1, Bone::roll1, EditBone::roll2, Bone::roll2, EditBone::scale_in, Bone::scale_in, EditBone::scale_out, Bone::scale_out, EditBone::segments, Bone::segments, square_f(), EditBone::tail, EditBone::temp, EditBone::weight, Bone::weight, EditBone::xwidth, Bone::xwidth, EditBone::zwidth, and Bone::zwidth.

Referenced by apply_armature_pose2bones_exec(), ED_armature_join_objects_exec(), ED_armature_origin_set(), ED_object_editmode_load_free_ex(), ArmatureImporter::make_armatures(), modifier_skin_armature_create(), separate_armature_bones(), and separate_armature_exec().

◆ ED_armature_join_objects_exec()

int ED_armature_join_objects_exec ( struct bContext C,
struct wmOperator op 
)

Join armature exec is exported for use in object->join objects operator.

Definition at line 256 of file armature_relations.c.

References bArmature::adt, Object::adt, ADT_MERGECOPY_KEEP_DST, atan2f, BKE_animdata_copy(), BKE_animdata_merge_copy(), BKE_fcurves_main_cb(), BKE_pose_channels_hash_free(), BKE_report(), BLI_addtail(), BLI_assert, BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_str_new(), BLI_remlink(), BLI_strdup(), BLI_strncpy(), tJoinArmature_AdtFixData::bmain, C, copy_m4_m3(), CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), Object::data, DEG_id_tag_update(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), ED_armature_ebone_find_name(), ED_armature_ebone_to_mat3(), ED_armature_ebone_unique_name(), ED_armature_edit_free(), ED_armature_from_edit(), ED_armature_to_edit(), ED_object_base_free_and_unlink(), bArmature::edbo, bArmature::id, Object::id, Scene::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, if(), invert_m4_m4(), invert_m4_m4_safe_ortho(), joined_armature_fix_animdata_cb(), joined_armature_fix_links(), MEM_freeN, Object::mode, mul_m4_m3m4(), mul_m4_m4m4(), mul_m4_v3(), tJoinArmature_AdtFixData::names_map, NC_SCENE, ND_LAYER_CONTENT, ND_OB_ACTIVE, NULL, OB_ARMATURE, OB_MODE_POSE, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::pose, wmOperator::reports, RPT_WARNING, scene, tJoinArmature_AdtFixData::srcArm, tJoinArmature_AdtFixData::tarArm, Object::type, unit_m4(), and WM_event_add_notifier().

Referenced by object_join_exec().

◆ ED_armature_object_and_ebone_from_select_buffer()

struct Object* ED_armature_object_and_ebone_from_select_buffer ( struct Object **  objects,
uint  objects_len,
unsigned int  select_id,
struct EditBone **  r_ebone 
)

Definition at line 78 of file armature_select.c.

References BLI_findlink(), BONESEL_ANY, Object::data, bArmature::edbo, and NULL.

◆ ED_armature_origin_set()

void ED_armature_origin_set ( struct Main bmain,
struct Object ob,
const float  cursor[3],
int  centermode,
int  around 
)

◆ ED_armature_pose_select_in_wpaint_mode()

void ED_armature_pose_select_in_wpaint_mode ( struct ViewLayer view_layer,
struct Base base_select 
)

While in weight-paint mode, a single pose may be active as well. While not common, it's possible we have multiple armatures deforming a mesh.

This function de-selects all other objects, and selects the new base. It can't be set to the active object because we need to keep this set to the weight paint object.

Definition at line 269 of file pose_select.c.

References BA_DESELECT, BA_SELECT, BASE_SELECTED, BKE_gpencil_modifiers_get_virtual_modifierlist(), BKE_modifiers_get_virtual_modifierlist(), BKE_view_layer_base_find(), BLI_assert, ED_object_base_select(), eGpencilModifierType_Armature, eModifierType_Armature, Base::flag, Object::mode, GpencilModifierData::next, ModifierData::next, NULL, OB_ARMATURE, OB_GPENCIL, OB_MODE_ALL_WEIGHT_PAINT, OBACT, ArmatureGpencilModifierData::object, Base::object, ArmatureModifierData::object, GpencilModifierData::type, ModifierData::type, and Object::type.

Referenced by bone_select_menu_exec(), and ed_object_select_pick().

◆ ED_armature_pose_select_pick_bone()

bool ED_armature_pose_select_pick_bone ( struct ViewLayer view_layer,
struct View3D v3d,
struct Object ob,
struct Bone bone,
const struct SelectPick_Params params 
)

◆ ED_armature_pose_select_pick_with_buffer()

bool ED_armature_pose_select_pick_with_buffer ( struct ViewLayer view_layer,
struct View3D v3d,
struct Base base,
const struct GPUSelectResult buffer,
short  hits,
const struct SelectPick_Params params,
bool  do_nearest 
)

Called for mode-less pose selection. assumes the active object is still on old situation.

Returns
True when pick finds an element or the selection changed.

Definition at line 246 of file pose_select.c.

References buffer, ED_armature_pick_bone_from_selectbuffer(), ED_armature_pose_select_pick_bone(), NULL, Base::object, params, and Object::pose.

Referenced by ed_object_select_pick().

◆ ED_armature_to_edit()

void ED_armature_to_edit ( struct bArmature arm)

◆ ED_armature_transform()

void ED_armature_transform ( struct bArmature arm,
const float  mat[4][4],
bool  do_props 
)

◆ ED_armature_undosys_type()

void ED_armature_undosys_type ( struct UndoType ut)

◆ ED_keymap_armature()

void ED_keymap_armature ( struct wmKeyConfig keyconf)

◆ ED_mesh_deform_bind_callback()

void ED_mesh_deform_bind_callback ( struct Object object,
struct MeshDeformModifierData mmd,
struct Mesh cagemesh,
float vertexcos,
int  verts_num,
float  cagemat[4][4] 
)

◆ ED_object_posemode_enter()

bool ED_object_posemode_enter ( struct bContext C,
struct Object ob 
)

◆ ED_object_posemode_enter_ex()

bool ED_object_posemode_enter_ex ( struct Main bmain,
struct Object ob 
)

◆ ED_object_posemode_exit()

bool ED_object_posemode_exit ( struct bContext C,
struct Object ob 
)

◆ ED_object_posemode_exit_ex()

bool ED_object_posemode_exit_ex ( struct Main bmain,
struct Object ob 
)

◆ ED_object_vgroup_calc_from_armature()

void ED_object_vgroup_calc_from_armature ( struct ReportList reports,
struct Depsgraph depsgraph,
struct Scene scene,
struct Object ob,
struct Object par,
int  mode,
bool  mirror 
)

◆ ED_operatormacros_armature()

void ED_operatormacros_armature ( void  )

◆ ED_operatortypes_armature()

void ED_operatortypes_armature ( void  )

Definition at line 20 of file armature_ops.c.

References ARMATURE_OT_align(), ARMATURE_OT_armature_layers(), ARMATURE_OT_autoside_names(), ARMATURE_OT_bone_layers(), ARMATURE_OT_bone_primitive_add(), ARMATURE_OT_calculate_roll(), ARMATURE_OT_click_extrude(), ARMATURE_OT_delete(), ARMATURE_OT_dissolve(), ARMATURE_OT_duplicate(), ARMATURE_OT_extrude(), ARMATURE_OT_fill(), ARMATURE_OT_flip_names(), ARMATURE_OT_hide(), ARMATURE_OT_layers_show_all(), ARMATURE_OT_parent_clear(), ARMATURE_OT_parent_set(), ARMATURE_OT_reveal(), ARMATURE_OT_roll_clear(), ARMATURE_OT_select_all(), ARMATURE_OT_select_hierarchy(), ARMATURE_OT_select_less(), ARMATURE_OT_select_linked(), ARMATURE_OT_select_linked_pick(), ARMATURE_OT_select_mirror(), ARMATURE_OT_select_more(), ARMATURE_OT_select_similar(), ARMATURE_OT_separate(), ARMATURE_OT_shortest_path_pick(), ARMATURE_OT_split(), ARMATURE_OT_subdivide(), ARMATURE_OT_switch_direction(), ARMATURE_OT_symmetrize(), POSE_OT_armature_apply(), POSE_OT_autoside_names(), POSE_OT_blend_to_neighbors(), POSE_OT_bone_layers(), POSE_OT_breakdown(), POSE_OT_copy(), POSE_OT_flip_names(), POSE_OT_group_add(), POSE_OT_group_assign(), POSE_OT_group_deselect(), POSE_OT_group_move(), POSE_OT_group_remove(), POSE_OT_group_select(), POSE_OT_group_sort(), POSE_OT_group_unassign(), POSE_OT_hide(), POSE_OT_loc_clear(), POSE_OT_paste(), POSE_OT_paths_calculate(), POSE_OT_paths_clear(), POSE_OT_paths_range_update(), POSE_OT_paths_update(), POSE_OT_propagate(), POSE_OT_push(), POSE_OT_push_rest(), POSE_OT_quaternions_flip(), POSE_OT_relax(), POSE_OT_relax_rest(), POSE_OT_reveal(), POSE_OT_rot_clear(), POSE_OT_rotation_mode_set(), POSE_OT_scale_clear(), POSE_OT_select_all(), POSE_OT_select_constraint_target(), POSE_OT_select_grouped(), POSE_OT_select_hierarchy(), POSE_OT_select_linked(), POSE_OT_select_linked_pick(), POSE_OT_select_mirror(), POSE_OT_select_parent(), POSE_OT_transforms_clear(), POSE_OT_user_transforms_clear(), POSE_OT_visual_transform_apply(), POSELIB_OT_action_sanitize(), POSELIB_OT_apply_pose(), POSELIB_OT_apply_pose_asset(), POSELIB_OT_blend_pose_asset(), POSELIB_OT_browse_interactive(), POSELIB_OT_new(), POSELIB_OT_pose_add(), POSELIB_OT_pose_move(), POSELIB_OT_pose_remove(), POSELIB_OT_pose_rename(), POSELIB_OT_unlink(), and WM_operatortype_append().

Referenced by ED_spacetypes_init().

◆ ED_pose_backup_create_all_bones()

struct PoseBackup* ED_pose_backup_create_all_bones ( const struct Object ob,
const struct bAction action 
)

◆ ED_pose_backup_create_selected_bones()

struct PoseBackup* ED_pose_backup_create_selected_bones ( const struct Object ob,
const struct bAction action 
)

Create a backup of those bones that are animated in the given action.

◆ ED_pose_backup_free()

void ED_pose_backup_free ( struct PoseBackup pbd)

◆ ED_pose_backup_is_selection_relevant()

bool ED_pose_backup_is_selection_relevant ( const struct PoseBackup pose_backup)

Definition at line 101 of file pose_backup.cc.

References PoseBackup::is_bone_selection_relevant.

Referenced by poselib_keytag_pose().

◆ ED_pose_backup_restore()

void ED_pose_backup_restore ( const struct PoseBackup pbd)

◆ ED_pose_bone_select()

void ED_pose_bone_select ( struct Object ob,
struct bPoseChannel pchan,
bool  select 
)

◆ ED_pose_bone_select_tag_update()

void ED_pose_bone_select_tag_update ( struct Object ob)

◆ ED_pose_deselect_all()

bool ED_pose_deselect_all ( struct Object ob,
int  select_mode,
bool  ignore_visibility 
)

'select_mode' is usual SEL_SELECT/SEL_DESELECT/SEL_TOGGLE/SEL_INVERT. When true, 'ignore_visibility' makes this func also affect invisible bones (hidden or on hidden layers).

Definition at line 315 of file pose_select.c.

References bPoseChannel::bone, BONE_SELECTED, bPose::chanbase, Object::data, ListBase::first, Bone::flag, bPoseChannel::next, NULL, PBONE_VISIBLE, Object::pose, pose_do_bone_select(), SEL_DESELECT, SEL_SELECT, and SEL_TOGGLE.

Referenced by click_select_channel_group(), do_pose_tag_select_op_exec(), ED_armature_pose_select_pick_bone(), ED_object_jump_to_bone(), ED_pose_deselect_all_multi_ex(), and pose_circle_select().

◆ ED_pose_deselect_all_multi()

bool ED_pose_deselect_all_multi ( struct bContext C,
int  select_mode,
bool  ignore_visibility 
)

◆ ED_pose_deselect_all_multi_ex()

bool ED_pose_deselect_all_multi_ex ( struct Base **  bases,
uint  bases_len,
int  select_mode,
bool  ignore_visibility 
)

◆ ED_pose_object_from_context()

struct Object* ED_pose_object_from_context ( struct bContext C)

◆ ED_pose_recalculate_paths()

void ED_pose_recalculate_paths ( struct bContext C,
struct Scene scene,
struct Object ob,
ePosePathCalcRange  range 
)