67 EditBone *bone = MEM_new<EditBone>(
"eBone");
108 const bool view_aligned)
143 EditBone *ebone, *newbone, *flipbone;
144 float mat[3][3], imat[3][3];
151 arm = id_cast<bArmature *>(obedit->
data);
154 for (ebone = arm->
edbo->first(); ebone; ebone = ebone->
next) {
163 if (ebone ==
nullptr) {
164 for (ebone = arm->
edbo->first(); ebone; ebone = ebone->
next) {
172 if (ebone ==
nullptr) {
187 for (a = 0; a < 2; a++) {
189 if (flipbone ==
nullptr) {
192 std::swap(flipbone, ebone);
217 newbone->
tail[0] = -newbone->
tail[0];
220 copy_m3_m4(mat, obedit->object_to_world().ptr());
234 float parent_mat[3][3];
264 float tvec[3], oldcurs[3], mval_f[2];
294 ot->
name =
"Extrude to Cursor";
295 ot->
idname =
"ARMATURE_OT_click_extrude";
296 ot->
description =
"Create a new bone going from the last selected joint to the mouse position";
337 const char *name_src = pchan_src->
name;
343 if (pchan_dst ==
nullptr) {
344 pchan_dst = pchan_src;
352 if (ob->
pose ==
nullptr) {
361 for (
EditBone &ebone_src : *editbones) {
368 name_map.
add_as(ebone_src.name, ebone_dst->
name);
372 for (
EditBone &ebone_src : *editbones) {
402 const bool lookup_mirror_subtarget)
414 ListBaseT<bConstraint> *conlist = &pchan->
constraints;
420 ListBaseT<bConstraintTarget> targets = {
nullptr,
nullptr};
426 if (!ct.tar || !ct.subtarget[0]) {
429 Object *target_ob = ct.tar;
434 bArmature *target_armature = id_cast<bArmature *>(target_ob->
data);
442 oldtarget = (ob == target_ob) ?
445 if (oldtarget && oldtarget->
temp.ebone) {
446 newtarget = oldtarget->
temp.ebone;
449 else if (lookup_mirror_subtarget) {
479 float max_axis_val = 0;
482 for (
int i = 0; i < 3; i++) {
483 float cur_val =
fabsf(mat[0][i]);
484 if (cur_val > max_axis_val) {
486 max_axis_val = cur_val;
496 if (act_con->
type < 10 && act_con->
type != max_axis) {
498 act_con->
min = -act_con->
min;
499 act_con->
max = -act_con->
max;
501 else if (act_con->
type == max_axis + 10) {
504 else if (act_con->
type == max_axis + 20) {
510 float min_vec[3], max_vec[3];
515 min_vec[0] = act_con->
min;
516 max_vec[0] = act_con->
max;
529 act_con->
min = min_vec[0];
530 act_con->
max = max_vec[0];
547 for (
const FCurve *old_fcurve : fcurves) {
549 old_fcurve->rna_path().c_str(), orig_bone->
name, dup_bone->
name);
551 *old_fcurve, new_path, old_fcurve->array_index, dup_bone->
name);
552 MEM_delete(new_path);
555 const size_t slength =
rna_path.size();
558 for (i = 0, bezt = new_curve.
bezt; i < new_curve.
totvert; i++, bezt++) {
581 bezt->
vec[0][1] *= -1;
582 bezt->
vec[1][1] *= -1;
583 bezt->
vec[2][1] *= -1;
609 float local_mat[4][4], imat[4][4];
611 float min_vec[3], max_vec[3];
613 min_vec[0] = limit->
xmin;
614 min_vec[1] = limit->
ymin;
615 min_vec[2] = limit->
zmin;
617 max_vec[0] = limit->
xmax;
618 max_vec[1] = limit->
ymax;
619 max_vec[2] = limit->
zmax;
635 local_mat[3][0] = local_mat[3][1] = local_mat[3][2] = 0;
648 min_vec[1] = max_vec[1] * -1;
649 min_vec[2] = max_vec[2] * -1;
651 max_vec[1] = min_copy[1] * -1;
652 max_vec[2] = min_copy[2] * -1;
655 float min_x_copy = min_vec[0];
657 min_vec[0] = max_vec[0] * -1;
658 max_vec[0] = min_x_copy * -1;
670 limit->
xmin = min_vec[0];
671 limit->
ymin = min_vec[1];
672 limit->
zmin = min_vec[2];
674 limit->
xmax = max_vec[0];
675 limit->
ymax = max_vec[1];
676 limit->
zmax = max_vec[2];
685 float target_mat[4][4], own_mat[4][4], imat[4][4];
699 float old_min, old_max;
721 own_mat[3][0] = own_mat[3][1] = own_mat[3][2] = 0;
749 float imat_rot[4][4];
764 target_mat[3][0] = target_mat[3][1] = target_mat[3][2] = 0;
782 for (
int i = 0; i < 3; i++) {
801 for (
int i = 0; i < 3; i++) {
809 trans->
to_min[i] = temp_vec[i];
828 for (
int i = 0; i < 3; i++) {
912 ListBaseT<bConstraint> *conlist;
921 switch (curcon.type) {
955 if (ob->
pose ==
nullptr) {
968 bool needs_flip_scale =
true;
970 if (pchan->
custom !=
nullptr) {
981 if (shape_ob !=
nullptr) {
984 needs_flip_scale =
false;
989 if (needs_flip_scale) {
1000 float limit_min = pose_bone->
limitmin[2];
1002 pose_bone->
limitmax[2] = -limit_min;
1009 BLI_assert_msg(armature.
edbo !=
nullptr,
"Expecting the armature to be in edit mode");
1019 if (
STREQ(name_flip, collection->
name)) {
1024 if (!flipped_collection) {
1031 unassign_collections.
append(collection);
1032 assign_collections.
append(flipped_collection);
1049 if (src_bone->
prop) {
1078 memcpy(dest, source,
sizeof(*dest));
1084 ListBaseT<EditBone> *editbones,
1088 EditBone *e_bone = MEM_new<EditBone>(
"addup_editbone");
1093 cur_bone->
temp.ebone = e_bone;
1094 e_bone->
temp.ebone = cur_bone;
1096 if (name !=
nullptr) {
1103 copy_pchan(cur_bone, e_bone, src_ob, dst_ob);
1110 ListBaseT<EditBone> *editbones,
1117 const bool do_flip_names,
1132 for (
Object *ob : objects) {
1135 EditBone *ebone_first_dupe =
nullptr;
1137 bArmature *arm = id_cast<bArmature *>(ob->data);
1158 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1159 ebone_iter = ebone_iter->
next)
1164 const char *new_bone_name = ebone_iter->
name;
1166 if (do_flip_names) {
1168 new_bone_name_buff, ebone_iter->
name,
false,
sizeof(new_bone_name_buff));
1173 new_bone_name = new_bone_name_buff;
1176 std::string buffer(new_bone_name);
1179 new_bone_name = buffer.data();
1184 if (!ebone_first_dupe) {
1185 ebone_first_dupe = ebone;
1191 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1192 ebone_iter = ebone_iter->
next)
1197 if (!ebone_iter->
parent) {
1236 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1237 ebone_iter = ebone_iter->
next)
1264 ot->
name =
"Duplicate Selected Bone(s)";
1265 ot->
idname =
"ARMATURE_OT_duplicate";
1266 ot->
description =
"Make copies of the selected bones within the same armature";
1280 "Try to flip names of the bones, if possible, instead of adding a number extension");
1288 if (search.empty()) {
1305 ot->
name =
"Duplicate and Rename";
1306 ot->
idname =
"ARMATURE_OT_duplicate_rename";
1308 "Make copies of the selected bones within the same armature and replace a part of their "
1324 "Try to flip names of the bones, if possible, instead of adding a number extension");
1331 "A part of the current bone name that will be replaced");
1337 "The substitute to be inserted into the place of the given search term. If left "
1338 "empty the search term will be removed");
1344 if (bone ==
nullptr) {
1347 if (bone->
temp.ebone !=
nullptr) {
1348 return bone->
temp.ebone;
1352 return (mirror !=
nullptr) ? mirror : bone;
1375 for (
Object *obedit : objects) {
1378 EditBone *ebone_first_dupe =
nullptr;
1380 bArmature *arm = id_cast<bArmature *>(obedit->data);
1400 if (
STREQ(name_flip, ebone_iter.
name)) {
1418 axis_delta = ebone->
head[axis] - ebone_iter.
head[axis];
1419 if (axis_delta == 0.0f) {
1421 axis_delta = ebone->
tail[axis] - ebone_iter.
tail[axis];
1423 if (axis_delta == 0.0f) {
1433 if (((axis_delta < 0.0f) ? -1 : 1) == direction) {
1444 ebone_iter.
temp.ebone = ebone;
1448 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1449 ebone_iter = ebone_iter->
next)
1452 if (ebone_iter->
temp.ebone !=
nullptr) {
1472 if (!
STREQ(name_flip, ebone_iter->
name)) {
1477 if (!ebone_first_dupe) {
1478 ebone_first_dupe = ebone;
1485 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1486 ebone_iter = ebone_iter->
next)
1488 if (ebone_iter->
temp.ebone) {
1496 ebone->
flag = (ebone->
flag & ~flag_copy) | (ebone_iter->
flag & flag_copy);
1500 if (copy_bone_colors) {
1508 if (ebone_iter->
parent ==
nullptr) {
1519 if (ebone_parent == ebone_iter->
parent) {
1525 if (ebone->
head[axis] != 0.0f) {
1532 ebone->
parent = ebone_parent;
1567 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1568 ebone_iter = ebone_iter->
next)
1576 for (ebone_iter = arm->
edbo->first(); ebone_iter && ebone_iter != ebone_first_dupe;
1577 ebone_iter = ebone_iter->
next)
1605 {-1,
"NEGATIVE_X", 0,
"-X to +X",
""},
1606 {+1,
"POSITIVE_X", 0,
"+X to -X",
""},
1607 {0,
nullptr, 0,
nullptr,
nullptr},
1611 ot->
name =
"Symmetrize";
1612 ot->
idname =
"ARMATURE_OT_symmetrize";
1613 ot->
description =
"Enforce symmetry, make copies of the selection or use existing";
1624 arm_symmetrize_direction_items,
1627 "Which sides to copy from and to (when both are selected)");
1629 ot->
srna,
"copy_bone_colors",
false,
"Bone Colors",
"Copy colors to existing bones");
1643 bool changed_multi =
false;
1653 for (
Object *ob : objects) {
1654 bArmature *arm = id_cast<bArmature *>(ob->data);
1655 bool forked_iter = forked;
1657 EditBone *newbone =
nullptr, *ebone, *flipbone, *first =
nullptr;
1659 ExtrudePoint do_extrude;
1675 for (ebone = arm->
edbo->first(); ((ebone) && (ebone != first)); ebone = ebone->
next) {
1680 do_extrude = SKIP_EXTRUDE;
1682 do_extrude = TIP_EXTRUDE;
1690 do_extrude = ROOT_EXTRUDE;
1700 forked_iter =
false;
1706 if ((flipbone ==
nullptr) && (forked_iter)) {
1711 for (a = 0; a < 2; a++) {
1713 if (flipbone ==
nullptr) {
1716 std::swap(flipbone, ebone);
1720 newbone = MEM_new<EditBone>(
"extrudebone");
1722 if (do_extrude == TIP_EXTRUDE) {
1734 else if (do_extrude == ROOT_EXTRUDE) {
1773 if (flipbone && forked_iter) {
1790 if (a == 1 && flipbone) {
1791 std::swap(flipbone, ebone);
1800 if (totbone == 1 && first) {
1811 changed_multi =
true;
1820 if (!changed_multi) {
1832 ot->
name =
"Extrude";
1833 ot->
idname =
"ARMATURE_OT_extrude";
1834 ot->
description =
"Create new bones from the selected joints";
1878 bone_orient_mat = imat * view_mat;
1879 roll_vector = bone_orient_mat.
z_axis();
1887 bone_orient_mat = imat * cursor_mat;
1888 roll_vector = bone_orient_mat.
z_axis();
1895 bone_orient_mat = imat;
1896 roll_vector = imat.
z_axis();
1900 bone_orient_mat =
float3x3({1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, -1.0f}, {0.0f, 1.0f, 0.0f});
1910 bone_orient_mat = imat *
1911 float3x3({1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f}, {0.0f, -1.0f, 0.0f});
1914 roll_vector = -imat.
y_axis();
1929 const float3 curs_objectspace =
1930 (obedit->world_to_object() *
float4(curs_worldspace, 1.0f)).xyz();
1952 "Bone not added to a collection and hidden because solo bone collection(s) exist.");
1958 "Bone that is not visible due to its bone collections MUST be assigned to at "
1959 "least one of them.");
1962 "Bone was added to a hidden collection '%s'",
1975 if (needs_bone_roll) {
2000 ot->
name =
"Add Bone";
2001 ot->
idname =
"ARMATURE_OT_bone_primitive_add";
2002 ot->
description =
"Add a new bone located at the 3D cursor";
2016 "Name of the newly created bone");
2023 "The newly created bone will use Object Space co-ordinate system"},
2028 "The newly created bone will use World Space co-ordinate system"},
2029 {0,
nullptr, 0,
nullptr,
nullptr}};
2036 "Co-ordinate system the new bone will be created in");
2043 "Make the bone visually point upwards so the long axis is aligned with the World/Object "
2044 "positive Z axis (depending on the choice above)"},
2049 "Align the new bone to match the axes of the World/Object (depending on the choice above)"},
2054 "Align new bone to match the axes of the 3D cursor"},
2059 "Align new bone to match the axes of the 3D viewport"},
2060 {0,
nullptr, 0,
nullptr,
nullptr}};
2067 "Initial orientation of the new bone");
2075 "Length of the new bone",
2078 RNA_def_boolean(ot->
srna,
"use_deform",
true,
"Deform",
"Enable bone to deform geometry");
2102 EditBone *last_bone_before_cutting = arm->edbo->last();
2104 "If there is no bone before subdividing, which bone is being subdivided here?");
2106 for (i = cuts + 1; i > 1; i--) {
2108 float cutratio = 1.0f /
float(i);
2109 float cutratioI = 1.0f - cutratio;
2115 newbone = MEM_new<EditBone>(
"ebone subdiv", *ebone);
2123 val3[0] = val1[0] * cutratio + val2[0] * cutratioI;
2124 val3[1] = val1[1] * cutratio + val2[1] * cutratioI;
2125 val3[2] = val1[2] * cutratio + val2[2] * cutratioI;
2131 newbone->
rad_head = ((ebone->rad_head * cutratio) + (ebone->rad_tail * cutratioI));
2132 ebone->rad_tail = newbone->
rad_head;
2135 newbone->
prop =
nullptr;
2139 for (
EditBone &tbone : *arm->edbo) {
2140 if (tbone.
parent == ebone) {
2162 ListBaseT<EditBone> new_bones;
2163 new_bones.first_ = last_bone_before_cutting->
next;
2164 new_bones.last_ = arm->edbo->last();
2165 for (
EditBone &newbone : new_bones.items_reversed()) {
2184 ot->
name =
"Subdivide";
2185 ot->
idname =
"ARMATURE_OT_subdivide";
2186 ot->
description =
"Break selected bones into chains of smaller bones";
2196 prop =
RNA_def_int(ot->
srna,
"number_cuts", 1, 1, 1000,
"Number of Cuts",
"", 1, 10);
Functions and classes to work with Actions.
Functions to deal with Armatures.
C++ functions to deal with Armature collections (i.e. the successor of bone layers).
Blender kernel action and pose functionality.
#define CTX_DATA_BEGIN_WITH_ID(C, Type, instance, member, Type_id, instance_id)
#define CTX_DATA_COUNT(C, member)
#define STRNCPY_UTF8(dst, src)
Object is a sort of wrapper for general info.
#define EBONE_SELECTABLE(arm, ebone)
Read Blender memory allocation and freeing.
#define BLI_assert_msg(a, msg)
Value lookup_default(const Key &key, const Value &default_value) const
bool add_as(ForwardKey &&key, ForwardValue &&...value)
constexpr const char * c_str() const
void append(const T &value)
FCurve & fcurve_clone(const FCurve &old_fcurve, StringRefNull new_path, int new_array_index, StringRef new_group_name)
Span< const FCurve * > fcurves() const
constexpr bool is_empty() const
float length(VecOp< float, D >) RET
bool fcurve_matches_collection_path(const FCurve &fcurve, StringRefNull collection_rna_path, StringRefNull data_name)
int armature_bonecoll_find_index(const bArmature *armature, const BoneCollection *bcoll)
const animrig::Channelbag * channelbag_for_action_slot(const Action &action, slot_handle_t slot_handle)
bool bone_is_visible(const bArmature *armature, const Bone *bone)
bool bone_is_selected(const bArmature *armature, const Bone *bone)
int armature_bonecoll_find_parent_index(const bArmature *armature, int bcoll_index)
constexpr char bone_default_name[]
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
bPoseChannel * BKE_pose_channel_ensure(bPose *pose, const char *name) ATTR_NONNULL(2)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void mul_m3_v3(const float M[3][3], float r[3])
int RNA_enum_get(PointerRNA *ptr, const char *name)
bool ANIM_armature_bonecoll_assign_editbone(BoneCollection *bcoll, EditBone *ebone)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
ID * BKE_libblock_find_name(Main *bmain, short type, const char *name, const std::optional< Library * > lib=std::nullopt) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
wmOperatorStatus WM_operator_flag_only_pass_through_on_press(wmOperatorStatus retval, const wmEvent *event)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BKE_constraint_targets_flush(struct bConstraint *con, ListBaseT< bConstraintTarget > *targets, bool no_copy)
void copy_m3_m4(float m1[3][3], const float m2[4][4])
static wmOperatorStatus armature_duplicate_rename_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_TYPE_ROTLIMIT
@ CONSTRAINT_TYPE_SHRINKWRAP
@ CONSTRAINT_TYPE_TRANSFORM
@ CONSTRAINT_TYPE_DAMPTRACK
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_TRACKTO
@ CONSTRAINT_TYPE_LOCKTRACK
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
void ED_armature_edit_transform_mirror_update(Object *obedit)
void void void void void void BLI_duplicatelist(ListBase *dst, const ListBase *src) ATTR_NONNULL(1
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
void BKE_pose_channels_hash_free(bPose *pose) ATTR_NONNULL(1)
void ARMATURE_OT_extrude(wmOperatorType *ot)
IDProperty * IDP_CopyProperty(const IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
BoneCollection * ANIM_armature_bonecoll_new(bArmature *armature, const char *name, int parent_index=-1)
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
static wmOperatorStatus armature_click_extrude_exec(bContext *C, wmOperator *)
void ARMATURE_OT_duplicate(wmOperatorType *ot)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
int bool bool bool BLI_strn_endswith(const char *__restrict str, const char *__restrict end, size_t str_len) ATTR_NONNULL(1
int RNA_int_get(PointerRNA *ptr, const char *name)
static void pre_edit_bone_duplicate(ListBaseT< EditBone > *editbones)
static wmOperatorStatus armature_duplicate_selected_exec(bContext *C, wmOperator *op)
static void update_duplicate_action_constraint_settings(EditBone *dup_bone, EditBone *orig_bone, Object *ob, bPoseChannel *pchan, bConstraint *curcon)
void ED_armature_ebone_unique_name(ListBaseT< EditBone > *ebones, char *name, EditBone *bone)
void BKE_pose_channels_hash_ensure(bPose *pose) ATTR_NONNULL(1)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
bool ED_operator_editarmature(bContext *C)
void ARMATURE_OT_duplicate_rename(wmOperatorType *ot)
MatBase< float, 4, 4 > float4x4
static void copy_pchan(EditBone *src_bone, EditBone *dst_bone, Object *src_ob, Object *dst_ob)
wmOperatorStatus WM_operator_props_popup_confirm(bContext *C, wmOperator *op, const wmEvent *)
EditBone * duplicateEditBone(EditBone *cur_bone, const char *name, ListBaseT< EditBone > *editbones, Object *ob)
static EditBone * get_symmetrized_bone(bArmature *arm, EditBone *bone)
void ARMATURE_OT_subdivide(wmOperatorType *ot)
ViewLayer * CTX_data_view_layer(const bContext *C)
void ED_armature_ebone_listbase_temp_clear(ListBaseT< EditBone > *lb)
static void mirror_bone_collection_assignments(bArmature &armature, EditBone &source_bone, EditBone &target_bone)
VecBase< float, 4 > float4
void mul_m4_v3(const float M[4][4], float r[3])
static void update_duplicate_constraint_lock_track_settings(bConstraint *curcon)
static wmOperatorStatus armature_duplicate_rename_exec(bContext *C, wmOperator *op)
void BKE_constraint_mat_convertspace(struct Object *ob, struct bPoseChannel *pchan, struct bConstraintOb *cob, float mat[4][4], short from, short to, bool keep_scale)
void BKE_pose_channel_free(bPoseChannel *pchan) ATTR_NONNULL(1)
EditBone * ED_armature_ebone_get_mirrored(const ListBaseT< EditBone > *edbo, EditBone *ebo)
void BKE_constraint_custom_object_space_init(struct bConstraintOb *cob, struct bConstraint *con)
static wmOperatorStatus armature_duplicate_selected(bContext *C, const bool do_flip_names, StringRefNull search, StringRefNull replace)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
void ED_armature_edit_sync_selection(ListBaseT< EditBone > *edbo)
static bPoseChannel * pchan_duplicate_map(const bPose *pose, const Map< StringRefNull, StringRefNull > &name_map, bPoseChannel *pchan_src)
static void post_edit_bone_duplicate(ListBaseT< EditBone > *editbones, Object *ob)
Object * CTX_data_edit_object(const bContext *C)
bool ANIM_armature_bonecoll_unassign_editbone(BoneCollection *bcoll, EditBone *ebone)
bool ANIM_bonecoll_is_visible_editbone(const bArmature *armature, const EditBone *ebone)
static void update_duplicate_subtarget(EditBone *dup_bone, Object *ob, const bool lookup_mirror_subtarget)
static wmOperatorStatus armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
BoneCollection * ANIM_armature_bonecoll_get_by_name(bArmature *armature, const char *name) ATTR_WARN_UNUSED_RESULT
@ ARM_DRAW_TYPE_ARMATURE_DEFINED
int BKE_constraint_targets_get(struct bConstraint *con, ListBaseT< bConstraintTarget > *r_targets)
void unit_m4(float m[4][4])
RegionView3D * CTX_wm_region_view3d(const bContext *C)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
MINLINE void zero_v3(float r[3])
MatBase< float, 3, 3 > float3x3
static wmOperatorStatus armature_click_extrude_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_from)
static void update_duplicate_constraint_settings(EditBone *dup_bone, EditBone *orig_bone, Object *ob)
static void update_duplicate_loc_rot_constraint_settings(Object *ob, bPoseChannel *pchan, bConstraint *curcon)
void ED_armature_ebone_copy(EditBone *dest, const EditBone *source)
MINLINE float normalize_v3(float n[3])
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
static void update_duplicate_transform_constraint_settings(Object *ob, bPoseChannel *pchan, bConstraint *curcon)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
static void update_duplicate_custom_bone_shapes(bContext *C, EditBone *dup_bone, Object *ob)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Main * CTX_data_main(const bContext *C)
MINLINE void copy_v3_fl(float r[3], float f)
EditBone * ED_armature_ebone_add(bArmature *arm, const char *name)
void ARMATURE_OT_click_extrude(wmOperatorType *ot)
char * BLI_string_replaceN(const char *__restrict str, const char *__restrict substr_old, const char *__restrict substr_new) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void ANIM_armature_bonecoll_assign_active(const bArmature *armature, EditBone *ebone)
static void mirror_pose_bone(Object &ob, EditBone &ebone)
static void update_duplicate_constraint_damp_track_settings(bConstraint *curcon)
@ ID_RECALC_ANIMATION_NO_FLUSH
Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
EditBone * ED_armature_ebone_add_primitive(Object *obedit_arm, const float length, const bool view_aligned)
void ED_outliner_select_sync_from_edit_bone_tag(bContext *C)
EditBone * add_points_bone(Object *obedit, float head[3], float tail[3])
static void update_duplicate_kinematics_constraint_settings(bConstraint *curcon)
static wmOperatorStatus armature_symmetrize_exec(bContext *C, wmOperator *op)
Scene * CTX_data_scene(const bContext *C)
void ARMATURE_OT_bone_primitive_add(wmOperatorType *ot)
void vec_roll_to_mat3_normalized(const float nor[3], float roll, float r_mat[3][3])
@ OPTYPE_DEPENDS_ON_CURSOR
std::string RNA_string_get(PointerRNA *ptr, const char *name)
VecBase< float, 3 > float3
float ED_armature_ebone_roll_to_vector(const EditBone *bone, const float align_axis[3], const bool axis_only)
@ BONE_RELATIVE_PARENTING
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void ARMATURE_OT_symmetrize(wmOperatorType *ot)
static wmOperatorStatus armature_extrude_exec(bContext *C, wmOperator *op)
MINLINE void copy_v2fl_v2i(float r[2], const int a[2])
EditBone * duplicateEditBoneObjects(EditBone *cur_bone, const char *name, ListBaseT< EditBone > *editbones, Object *src_ob, Object *dst_ob)
void BLI_string_replace(std::string &haystack, StringRef needle, StringRef other)
void ED_view3d_win_to_3d(const View3D *v3d, const ARegion *region, const float depth_pt[3], const float mval[2], float r_out[3])
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
ARegion * CTX_wm_region(const bContext *C)
void ED_armature_ebone_select_set(EditBone *ebone, bool select)
static wmOperatorStatus armature_subdivide_exec(bContext *C, wmOperator *op)
static void track_axis_x_swap(eTrackToAxis_Modes &value)
float RNA_float_get(PointerRNA *ptr, const char *name)
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
View3D * CTX_wm_view3d(const bContext *C)
static void update_duplicate_constraint_track_to_settings(bConstraint *curcon)
char char size_t char * BLI_strncat(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
EditBone * ED_armature_ebone_find_name(const ListBaseT< EditBone > *edbo, const char *name)
static void update_duplicate_constraint_shrinkwrap_settings(bConstraint *curcon)
bool ED_armature_edit_deselect_all(Object *obedit)
size_t BLI_string_flip_side_name(char *name_dst, const char *name_src, bool strip_number, size_t name_dst_maxncpy) ATTR_NONNULL(1
float angle_wrap_rad(float angle)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
struct BoneCollection * bcoll
union blender::EditBone::@252003325204232231327014100071366025164067232113 temp
ListBaseT< BoneCollectionReference > bone_collections
eBone_BBoneHandleFlag bbone_next_flag
eBone_BBoneMappingMode bbone_mapping_mode
eBone_BBoneFlag bbone_flag
IDProperty * system_properties
eBone_InheritScaleMode inherit_scale_mode
eBone_BBoneHandleType bbone_next_type
eBone_BBoneHandleFlag bbone_prev_flag
eBone_BBoneHandleType bbone_prev_type
const c_style_mat & ptr() const
static MatBase identity()
bke::ObjectRuntime * runtime
int32_t action_slot_handle
ListBaseT< EditBone > * edbo
struct EditBone * act_edbone
bke::bArmature_Runtime * runtime
struct bPoseChannel * pchan
struct Depsgraph * depsgraph
eBConstraint_SpaceTypes ownspace
eBConstraint_SpaceTypes tarspace
eTransformLimits_Flags flag
float custom_scale_xyz[3]
ListBaseT< struct bConstraint > constraints
struct bPoseChannel * custom_tx
struct bPoseChannel * bbone_next
float custom_rotation_euler[3]
struct bPoseChannel * bbone_prev
float custom_translation[3]
BoneCollection * active_collection
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports