Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-04-15 13:03:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-15 13:03:09 +0300
commit9e2ea6c500a3a5774a1aa174b6801d3a9edadd9a (patch)
tree25e8fd41033e82b6cb04a00b52390f899dc085e5 /source/blender/editors/armature
parentf3a8f97fcfa39d5dfe3e1f9d1b534e4f42ba9689 (diff)
parent0f2efce6c50718d7745a6dc1613acf62a186cc05 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_add.c54
-rw-r--r--source/blender/editors/armature/armature_edit.c44
-rw-r--r--source/blender/editors/armature/armature_naming.c8
-rw-r--r--source/blender/editors/armature/armature_relations.c12
-rw-r--r--source/blender/editors/armature/armature_select.c32
-rw-r--r--source/blender/editors/armature/armature_skinning.c2
-rw-r--r--source/blender/editors/armature/armature_utils.c30
-rw-r--r--source/blender/editors/armature/editarmature_generate.c6
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c14
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.h2
-rw-r--r--source/blender/editors/armature/pose_select.c6
-rw-r--r--source/blender/editors/armature/pose_transform.c2
14 files changed, 108 insertions, 108 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index bd3ddfe93c6..cb072bee345 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -63,12 +63,12 @@
/* default bone add, returns it selected, but without tail set */
/* XXX should be used everywhere, now it mallocs bones still locally in functions */
-EditBone *ED_armature_edit_bone_add(bArmature *arm, const char *name)
+EditBone *ED_armature_ebone_add(bArmature *arm, const char *name)
{
EditBone *bone = MEM_callocN(sizeof(EditBone), "eBone");
BLI_strncpy(bone->name, name, sizeof(bone->name));
- unique_editbone_name(arm->edbo, bone->name, NULL);
+ ED_armature_ebone_unique_name(arm->edbo, bone->name, NULL);
BLI_addtail(arm->edbo, bone);
@@ -97,15 +97,15 @@ EditBone *ED_armature_edit_bone_add(bArmature *arm, const char *name)
return bone;
}
-EditBone *ED_armature_edit_bone_add_primitive(Object *obedit_arm, float length, bool view_aligned)
+EditBone *ED_armature_ebone_add_primitive(Object *obedit_arm, float length, bool view_aligned)
{
bArmature *arm = obedit_arm->data;
EditBone *bone;
- ED_armature_deselect_all(obedit_arm);
+ ED_armature_edit_deselect_all(obedit_arm);
/* Create a bone */
- bone = ED_armature_edit_bone_add(arm, "Bone");
+ bone = ED_armature_ebone_add(arm, "Bone");
arm->act_edbone = bone;
@@ -157,12 +157,12 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
to_root = 1;
}
- ED_armature_deselect_all(obedit);
+ ED_armature_edit_deselect_all(obedit);
/* we re-use code for mirror editing... */
flipbone = NULL;
if (arm->flag & ARM_MIRROR_EDIT)
- flipbone = ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
for (a = 0; a < 2; a++) {
if (a == 1) {
@@ -173,7 +173,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- newbone = ED_armature_edit_bone_add(arm, ebone->name);
+ newbone = ED_armature_ebone_add(arm, ebone->name);
arm->act_edbone = newbone;
if (to_root) {
@@ -205,7 +205,7 @@ static int armature_click_extrude_exec(bContext *C, wmOperator *UNUSED(op))
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -268,7 +268,7 @@ EditBone *add_points_bone(Object *obedit, float head[3], float tail[3])
{
EditBone *ebo;
- ebo = ED_armature_edit_bone_add(obedit->data, "Bone");
+ ebo = ED_armature_ebone_add(obedit->data, "Bone");
copy_v3_v3(ebo->head, head);
copy_v3_v3(ebo->tail, tail);
@@ -333,7 +333,7 @@ void postEditBoneDuplicate(struct ListBase *editbones, Object *ob)
for (EditBone *ebone_src = editbones->first; ebone_src; ebone_src = ebone_src->next) {
EditBone *ebone_dst = ebone_src->temp.ebone;
if (!ebone_dst) {
- ebone_dst = ED_armature_bone_get_mirrored(editbones, ebone_src);
+ ebone_dst = ED_armature_ebone_get_mirrored(editbones, ebone_src);
}
if (ebone_dst) {
BLI_ghash_insert(name_map, ebone_src->name, ebone_dst->name);
@@ -438,7 +438,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
BLI_strncpy(eBone->name, name, sizeof(eBone->name));
}
- unique_editbone_name(editbones, eBone->name, NULL);
+ ED_armature_ebone_unique_name(editbones, eBone->name, NULL);
BLI_addtail(editbones, eBone);
/* copy the ID property */
@@ -487,7 +487,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
const bool do_flip_names = RNA_boolean_get(op->ptr, "do_flip_names");
- ED_armature_sync_selection(arm->edbo); // XXX why is this needed?
+ ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed?
preEditBoneDuplicate(arm->edbo);
@@ -499,7 +499,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
{
EditBone *ebone;
- ebone = ED_armature_bone_get_mirrored(arm->edbo, ebone_iter);
+ ebone = ED_armature_ebone_get_mirrored(arm->edbo, ebone_iter);
if (ebone) {
ebone->flag |= BONE_SELECTED;
}
@@ -522,7 +522,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
/* Only use flipped name if not yet in use. Otherwise we'd get again inconsistent namings
* (different numbers), better keep default behavior in this case. */
- if (ED_armature_bone_find_name(arm->edbo, new_bone_name_buff) == NULL) {
+ if (ED_armature_ebone_find_name(arm->edbo, new_bone_name_buff) == NULL) {
new_bone_name = new_bone_name_buff;
}
}
@@ -583,7 +583,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
postEditBoneDuplicate(arm->edbo, obedit);
- ED_armature_validate_active(arm);
+ ED_armature_edit_validate_active(arm);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -630,7 +630,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
if (CTX_DATA_COUNT(C, selected_bones) == 0)
return OPERATOR_CANCELLED;
- ED_armature_sync_selection(arm->edbo); // XXX why is this needed?
+ ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed?
preEditBoneDuplicate(arm->edbo);
@@ -648,7 +648,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
ebone_iter->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
else {
- EditBone *ebone = ED_armature_bone_find_name(arm->edbo, name_flip);
+ EditBone *ebone = ED_armature_ebone_find_name(arm->edbo, name_flip);
if (ebone) {
if ((ebone->flag & BONE_SELECTED) == 0) {
@@ -738,7 +738,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
/* the parent may have been duplicated, if not lookup the mirror parent */
EditBone *ebone_parent =
(ebone_iter->parent->temp.ebone ?
- ebone_iter->parent->temp.ebone : ED_armature_bone_get_mirrored(arm->edbo, ebone_iter->parent));
+ ebone_iter->parent->temp.ebone : ED_armature_ebone_get_mirrored(arm->edbo, ebone_iter->parent));
if (ebone_parent == NULL) {
/* If the mirror lookup failed, (but the current bone has a parent)
@@ -759,7 +759,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
}
}
- transform_armature_mirror_update(obedit);
+ ED_armature_edit_transform_mirror_update(obedit);
/* Selected bones now have their 'temp' pointer set,
* so we don't need this anymore */
@@ -786,7 +786,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
postEditBoneDuplicate(arm->edbo, obedit);
- ED_armature_validate_active(arm);
+ ED_armature_edit_validate_active(arm);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -870,7 +870,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
/* we re-use code for mirror editing... */
flipbone = NULL;
if (arm->flag & ARM_MIRROR_EDIT) {
- flipbone = ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
if (flipbone) {
forked = 0; // we extrude 2 different bones
if (flipbone->flag & (BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED))
@@ -944,7 +944,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
else strcat(newbone->name, "_R");
}
}
- unique_editbone_name(arm->edbo, newbone->name, NULL);
+ ED_armature_ebone_unique_name(arm->edbo, newbone->name, NULL);
/* Add the new bone to the list */
BLI_addtail(arm->edbo, newbone);
@@ -974,7 +974,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
}
/* Transform the endpoints */
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -1027,10 +1027,10 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
mul_m3_m3m3(totmat, obmat, viewmat);
invert_m3_m3(imat, totmat);
- ED_armature_deselect_all(obedit);
+ ED_armature_edit_deselect_all(obedit);
/* Create a bone */
- bone = ED_armature_edit_bone_add(obedit->data, name);
+ bone = ED_armature_ebone_add(obedit->data, name);
copy_v3_v3(bone->head, curs);
@@ -1118,7 +1118,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
newbone->prop = NULL;
- unique_editbone_name(arm->edbo, newbone->name, NULL);
+ ED_armature_ebone_unique_name(arm->edbo, newbone->name, NULL);
/* correct parent bones */
for (tbone = arm->edbo->first; tbone; tbone = tbone->next) {
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index bb3c4164fc1..f41aa432b35 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -67,7 +67,7 @@
/* ************************** Object Tools Exports ******************************* */
/* NOTE: these functions are exported to the Object module to be called from the tools there */
-void ED_armature_apply_transform(Object *ob, float mat[4][4], const bool do_props)
+void ED_armature_transform_apply(Object *ob, float mat[4][4], const bool do_props)
{
bArmature *arm = ob->data;
@@ -205,7 +205,7 @@ void ED_armature_origin_set(Object *ob, float cursor[3], int centermode, int aro
/* adjust bone roll to align Z axis with vector
* vec is in local space and is normalized
*/
-float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const bool axis_only)
+float ED_armature_ebone_roll_to_vector(const EditBone *bone, const float align_axis[3], const bool axis_only)
{
float mat[3][3], nor[3];
float vec[3], align_axis_proj[3], roll = 0.0f;
@@ -331,7 +331,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
sub_v3_v3v3(cursor_rel, cursor_local, ebone->head);
if (axis_flip) negate_v3(cursor_rel);
if (normalize_v3(cursor_rel) != 0.0f) {
- ebone->roll = ED_rollBoneToVector(ebone, cursor_rel, axis_only);
+ ebone->roll = ED_armature_ebone_roll_to_vector(ebone, cursor_rel, axis_only);
}
}
}
@@ -370,13 +370,13 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
if (axis_flip) negate_v3(vec);
if (is_edit) {
- ebone->roll = ED_rollBoneToVector(ebone, vec, axis_only);
+ ebone->roll = ED_armature_ebone_roll_to_vector(ebone, vec, axis_only);
}
/* parentless bones use cross product with child */
if (is_edit_parent) {
if (ebone->parent->parent == NULL) {
- ebone->parent->roll = ED_rollBoneToVector(ebone->parent, vec, axis_only);
+ ebone->parent->roll = ED_armature_ebone_roll_to_vector(ebone->parent, vec, axis_only);
}
}
}
@@ -420,7 +420,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if (EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) {
/* roll func is a callback which assumes that all is well */
- ebone->roll = ED_rollBoneToVector(ebone, vec, axis_only);
+ ebone->roll = ED_armature_ebone_roll_to_vector(ebone, vec, axis_only);
}
}
}
@@ -428,7 +428,7 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
if (arm->flag & ARM_MIRROR_EDIT) {
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if ((EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) == 0) {
- EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ EditBone *ebone_mirr = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
if (ebone_mirr && (EBONE_VISIBLE(arm, ebone_mirr) && EBONE_EDITABLE(ebone_mirr))) {
ebone->roll = -ebone_mirr->roll;
}
@@ -482,7 +482,7 @@ static int armature_roll_clear_exec(bContext *C, wmOperator *op)
if (arm->flag & ARM_MIRROR_EDIT) {
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
if ((EBONE_VISIBLE(arm, ebone) && EBONE_EDITABLE(ebone)) == 0) {
- EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ EditBone *ebone_mirr = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
if (ebone_mirr && (EBONE_VISIBLE(arm, ebone_mirr) && EBONE_EDITABLE(ebone_mirr))) {
ebone->roll = -ebone_mirr->roll;
}
@@ -771,7 +771,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
}
if (newbone) {
- ED_armature_deselect_all(obedit);
+ ED_armature_edit_deselect_all(obedit);
arm->act_edbone = newbone;
newbone->flag |= BONE_TIPSEL;
}
@@ -883,7 +883,7 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
}
newbone->flag |= (BONE_ROOTSEL | BONE_TIPSEL | BONE_SELECTED);
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
}
@@ -959,7 +959,7 @@ static int armature_merge_exec(bContext *C, wmOperator *op)
}
/* updates */
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, obedit);
return OPERATOR_FINISHED;
@@ -1181,7 +1181,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
* - if there's no mirrored copy of actbone (i.e. actbone = "parent.C" or "parent")
* then just use actbone. Useful when doing upper arm to spine.
*/
- actmirb = ED_armature_bone_get_mirrored(arm->edbo, actbone);
+ actmirb = ED_armature_ebone_get_mirrored(arm->edbo, actbone);
if (actmirb == NULL)
actmirb = actbone;
}
@@ -1293,7 +1293,7 @@ static bool armature_delete_ebone_cb(const char *bone_name, void *arm_p)
bArmature *arm = arm_p;
EditBone *ebone;
- ebone = ED_armature_bone_find_name(arm->edbo, bone_name);
+ ebone = ED_armature_ebone_find_name(arm->edbo, bone_name);
return (ebone && (ebone->flag & BONE_SELECTED) && (arm->layer & ebone->layer));
}
@@ -1320,7 +1320,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
if (arm->layer & curBone->layer) {
if (curBone->flag & BONE_SELECTED) {
if (curBone == arm->act_edbone) arm->act_edbone = NULL;
- ED_armature_edit_bone_remove(arm, curBone);
+ ED_armature_ebone_remove(arm, curBone);
changed = true;
}
}
@@ -1329,7 +1329,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
if (!changed)
return OPERATOR_CANCELLED;
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
BKE_pose_tag_recalc(CTX_data_main(C), obedit->pose);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -1358,7 +1358,7 @@ static bool armature_dissolve_ebone_cb(const char *bone_name, void *arm_p)
bArmature *arm = arm_p;
EditBone *ebone;
- ebone = ED_armature_bone_find_name(arm->edbo, bone_name);
+ ebone = ED_armature_ebone_find_name(arm->edbo, bone_name);
return (ebone && (ebone->flag & BONE_DONE));
}
@@ -1460,7 +1460,7 @@ static int armature_dissolve_selected_exec(bContext *C, wmOperator *UNUSED(op))
ebone->parent->rad_tail = ebone->rad_tail;
SET_FLAG_FROM_TEST(ebone->parent->flag, ebone->flag & BONE_TIPSEL, BONE_TIPSEL);
- ED_armature_edit_bone_remove_ex(arm, ebone, false);
+ ED_armature_ebone_remove_ex(arm, ebone, false);
changed = true;
}
}
@@ -1493,7 +1493,7 @@ static int armature_dissolve_selected_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -1538,8 +1538,8 @@ static int armature_hide_exec(bContext *C, wmOperator *op)
}
}
}
- ED_armature_validate_active(arm);
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_validate_active(arm);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -1581,8 +1581,8 @@ static int armature_reveal_exec(bContext *C, wmOperator *op)
}
}
}
- ED_armature_validate_active(arm);
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_validate_active(arm);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 52e9e424a85..e8d45f72f89 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -74,11 +74,11 @@
static bool editbone_unique_check(void *arg, const char *name)
{
struct {ListBase *lb; void *bone; } *data = arg;
- EditBone *dupli = ED_armature_bone_find_name(data->lb, name);
+ EditBone *dupli = ED_armature_ebone_find_name(data->lb, name);
return dupli && dupli != data->bone;
}
-void unique_editbone_name(ListBase *edbo, char *name, EditBone *bone)
+void ED_armature_ebone_unique_name(ListBase *edbo, char *name, EditBone *bone)
{
struct {ListBase *lb; void *bone; } data;
data.lb = edbo;
@@ -153,10 +153,10 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
/* now check if we're in editmode, we need to find the unique name */
if (arm->edbo) {
- EditBone *eBone = ED_armature_bone_find_name(arm->edbo, oldname);
+ EditBone *eBone = ED_armature_ebone_find_name(arm->edbo, oldname);
if (eBone) {
- unique_editbone_name(arm->edbo, newname, NULL);
+ ED_armature_ebone_unique_name(arm->edbo, newname, NULL);
BLI_strncpy(eBone->name, newname, MAXBONENAME);
}
else {
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index de2611f7092..0dafbf51d74 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -312,10 +312,10 @@ int join_armature_exec(bContext *C, wmOperator *op)
/* Copy bones and posechannels from the object to the edit armature */
for (pchan = opose->chanbase.first; pchan; pchan = pchann) {
pchann = pchan->next;
- curbone = ED_armature_bone_find_name(curarm->edbo, pchan->name);
+ curbone = ED_armature_ebone_find_name(curarm->edbo, pchan->name);
/* Get new name */
- unique_editbone_name(arm->edbo, curbone->name, NULL);
+ ED_armature_ebone_unique_name(arm->edbo, curbone->name, NULL);
BLI_ghash_insert(afd.names_map, BLI_strdup(pchan->name), curbone->name);
/* Transform the bone */
@@ -528,7 +528,7 @@ static void separate_armature_bones(Object *ob, short sel)
/* go through pose-channels, checking if a bone should be removed */
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchann) {
pchann = pchan->next;
- curbone = ED_armature_bone_find_name(arm->edbo, pchan->name);
+ curbone = ED_armature_ebone_find_name(arm->edbo, pchan->name);
/* check if bone needs to be removed */
if ( (sel && (curbone->flag & BONE_SELECTED)) ||
@@ -640,7 +640,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
ED_armature_to_edit(obedit->data);
/* parents tips remain selected when connected children are removed. */
- ED_armature_deselect_all(obedit);
+ ED_armature_edit_deselect_all(obedit);
BKE_report(op->reports, RPT_INFO, "Separated bones");
@@ -760,7 +760,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
* - if there's no mirrored copy of actbone (i.e. actbone = "parent.C" or "parent")
* then just use actbone. Useful when doing upper arm to spine.
*/
- actmirb = ED_armature_bone_get_mirrored(arm->edbo, actbone);
+ actmirb = ED_armature_ebone_get_mirrored(arm->edbo, actbone);
if (actmirb == NULL)
actmirb = actbone;
}
@@ -883,7 +883,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index 397691a409b..7149fb15f45 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -64,7 +64,7 @@
/* **************** PoseMode & EditMode Selection Buffer Queries *************************** */
/* only for opengl selection indices */
-Bone *get_indexed_bone(Object *ob, int index)
+Bone *ED_armature_bone_find_index(Object *ob, int index)
{
bPoseChannel *pchan;
if (ob->pose == NULL) return NULL;
@@ -100,7 +100,7 @@ void *get_bone_from_selectbuffer(
if (obedit == NULL || base->object != obedit) {
/* no singular posemode, so check for correct object */
if (base->object->select_color == (hitresult & 0xFFFF)) {
- bone = get_indexed_bone(base->object, hitresult);
+ bone = ED_armature_bone_find_index(base->object, hitresult);
if (findunsel)
sel = (bone->flag & BONE_SELECTED);
@@ -247,7 +247,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv
bone = NULL;
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -444,7 +444,7 @@ cache_end:
return NULL;
}
-void ED_armature_deselect_all(Object *obedit)
+void ED_armature_edit_deselect_all(Object *obedit)
{
bArmature *arm = obedit->data;
EditBone *ebone;
@@ -454,7 +454,7 @@ void ED_armature_deselect_all(Object *obedit)
}
}
-void ED_armature_deselect_all_visible(Object *obedit)
+void ED_armature_edit_deselect_all_visible(Object *obedit)
{
bArmature *arm = obedit->data;
EditBone *ebone;
@@ -466,7 +466,7 @@ void ED_armature_deselect_all_visible(Object *obedit)
}
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
}
/* accounts for connected parents */
@@ -481,7 +481,7 @@ static int ebone_select_flag(EditBone *ebone)
}
/* context: editmode armature in view3d */
-bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
+bool ED_armature_edit_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
{
Object *obedit = CTX_data_edit_object(C);
bArmature *arm = obedit->data;
@@ -501,7 +501,7 @@ bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool d
if (nearBone) {
if (!extend && !deselect && !toggle) {
- ED_armature_deselect_all(obedit);
+ ED_armature_edit_deselect_all(obedit);
}
/* by definition the non-root connected bones have no root point drawn,
@@ -572,7 +572,7 @@ bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool d
nearBone->flag |= selmask;
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
if (nearBone) {
/* then now check for active status */
@@ -716,7 +716,7 @@ static void armature_select_more_less(Object *ob, bool more)
EditBone *ebone;
/* XXX, eventually we shouldn't need this - campbell */
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
/* count bones & store selection state */
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
@@ -746,7 +746,7 @@ static void armature_select_more_less(Object *ob, bool more)
ebone->temp.p = NULL;
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
}
static int armature_de_select_more_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1151,7 +1151,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
@@ -1207,7 +1207,7 @@ static int armature_select_mirror_exec(bContext *C, wmOperator *op)
EditBone *ebone_mirror;
int flag_new = extend ? EBONE_PREV_FLAG_GET(ebone) : 0;
- if ((ebone_mirror = ED_armature_bone_get_mirrored(arm->edbo, ebone)) &&
+ if ((ebone_mirror = ED_armature_ebone_get_mirrored(arm->edbo, ebone)) &&
(EBONE_VISIBLE(arm, ebone_mirror)))
{
const int flag_mirror = EBONE_PREV_FLAG_GET(ebone_mirror);
@@ -1231,7 +1231,7 @@ static int armature_select_mirror_exec(bContext *C, wmOperator *op)
arm->act_edbone = ebone_mirror_act;
}
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
@@ -1316,7 +1316,7 @@ static int armature_shortest_path_pick_invoke(bContext *C, wmOperator *op, const
else if (ED_armature_ebone_is_child_recursive(ebone_dst, ebone_src)) {
SWAP(EditBone *, ebone_src, ebone_dst);
}
- else if ((ebone_isect_parent = ED_armature_bone_find_shared_parent(ebone_isect_child, 2))) {
+ else if ((ebone_isect_parent = ED_armature_ebone_find_shared_parent(ebone_isect_child, 2))) {
/* pass */
}
else {
@@ -1351,7 +1351,7 @@ static int armature_shortest_path_pick_invoke(bContext *C, wmOperator *op, const
if (changed) {
arm->act_edbone = ebone_dst;
- ED_armature_sync_selection(arm->edbo);
+ ED_armature_edit_sync_selection(arm->edbo);
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 5c8e08a0d89..e25056a7a4a 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -431,7 +431,7 @@ static void add_verts_to_dgroups(
MEM_freeN(verts);
}
-void create_vgroups_from_armature(
+void ED_object_vgroup_calc_from_armature(
ReportList *reports, const EvaluationContext *eval_ctx, Scene *scene, Object *ob, Object *par,
const int mode, const bool mirror)
{
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index aa0aa0e03ff..c4580a370c9 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -54,7 +54,7 @@
/* Validation */
/* Sync selection to parent for connected children */
-void ED_armature_sync_selection(ListBase *edbo)
+void ED_armature_edit_sync_selection(ListBase *edbo)
{
EditBone *ebo;
@@ -76,7 +76,7 @@ void ED_armature_sync_selection(ListBase *edbo)
}
}
-void ED_armature_validate_active(struct bArmature *arm)
+void ED_armature_edit_validate_active(struct bArmature *arm)
{
EditBone *ebone = arm->act_edbone;
@@ -137,7 +137,7 @@ void bone_free(bArmature *arm, EditBone *bone)
/**
* \param clear_connected: When false caller is responsible for keeping the flag in a valid state.
*/
-void ED_armature_edit_bone_remove_ex(bArmature *arm, EditBone *exBone, bool clear_connected)
+void ED_armature_ebone_remove_ex(bArmature *arm, EditBone *exBone, bool clear_connected)
{
EditBone *curBone;
@@ -154,9 +154,9 @@ void ED_armature_edit_bone_remove_ex(bArmature *arm, EditBone *exBone, bool clea
bone_free(arm, exBone);
}
-void ED_armature_edit_bone_remove(bArmature *arm, EditBone *exBone)
+void ED_armature_ebone_remove(bArmature *arm, EditBone *exBone)
{
- ED_armature_edit_bone_remove_ex(arm, exBone, true);
+ ED_armature_ebone_remove_ex(arm, exBone, true);
}
bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebone_child)
@@ -175,7 +175,7 @@ bool ED_armature_ebone_is_child_recursive(EditBone *ebone_parent, EditBone *ebon
* \param ebone_child_tot Size of the ebone_child array
* \return The shared parent or NULL.
*/
-EditBone *ED_armature_bone_find_shared_parent(EditBone *ebone_child[], const unsigned int ebone_child_tot)
+EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[], const unsigned int ebone_child_tot)
{
unsigned int i;
EditBone *ebone_iter;
@@ -255,7 +255,7 @@ void ED_armature_ebone_from_mat4(EditBone *ebone, float mat[4][4])
/**
* Return a pointer to the bone of the given name
*/
-EditBone *ED_armature_bone_find_name(const ListBase *edbo, const char *name)
+EditBone *ED_armature_ebone_find_name(const ListBase *edbo, const char *name)
{
return BLI_findstring(edbo, name, offsetof(EditBone, name));
}
@@ -267,7 +267,7 @@ EditBone *ED_armature_bone_find_name(const ListBase *edbo, const char *name)
/**
* \see #BKE_pose_channel_get_mirrored (pose-mode, matching function)
*/
-EditBone *ED_armature_bone_get_mirrored(const ListBase *edbo, EditBone *ebo)
+EditBone *ED_armature_ebone_get_mirrored(const ListBase *edbo, EditBone *ebo)
{
char name_flip[MAXBONENAME];
@@ -277,7 +277,7 @@ EditBone *ED_armature_bone_get_mirrored(const ListBase *edbo, EditBone *ebo)
BLI_string_flip_side_name(name_flip, ebo->name, false, sizeof(name_flip));
if (!STREQ(name_flip, ebo->name)) {
- return ED_armature_bone_find_name(edbo, name_flip);
+ return ED_armature_ebone_find_name(edbo, name_flip);
}
return NULL;
@@ -297,7 +297,7 @@ void armature_select_mirrored_ex(bArmature *arm, const int flag)
for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (arm->layer & curBone->layer) {
if (curBone->flag & flag) {
- ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ ebone_mirr = ED_armature_ebone_get_mirrored(arm->edbo, curBone);
if (ebone_mirr)
ebone_mirr->flag |= (curBone->flag & flag);
}
@@ -326,7 +326,7 @@ void armature_tag_select_mirrored(bArmature *arm)
for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (arm->layer & curBone->layer) {
if (curBone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL)) {
- EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ EditBone *ebone_mirr = ED_armature_ebone_get_mirrored(arm->edbo, curBone);
if (ebone_mirr && (ebone_mirr->flag & BONE_SELECTED) == 0) {
ebone_mirr->flag |= BONE_DONE;
}
@@ -336,7 +336,7 @@ void armature_tag_select_mirrored(bArmature *arm)
for (curBone = arm->edbo->first; curBone; curBone = curBone->next) {
if (curBone->flag & BONE_DONE) {
- EditBone *ebone_mirr = ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ EditBone *ebone_mirr = ED_armature_ebone_get_mirrored(arm->edbo, curBone);
curBone->flag |= ebone_mirr->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL);
}
}
@@ -359,7 +359,7 @@ void armature_tag_unselect(bArmature *arm)
/* if editbone (partial) selected, copy data */
/* context; editmode armature, with mirror editing enabled */
-void transform_armature_mirror_update(Object *obedit)
+void ED_armature_edit_transform_mirror_update(Object *obedit)
{
bArmature *arm = obedit->data;
EditBone *ebo, *eboflip;
@@ -367,7 +367,7 @@ void transform_armature_mirror_update(Object *obedit)
for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
/* no layer check, correct mirror is more important */
if (ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) {
- eboflip = ED_armature_bone_get_mirrored(arm->edbo, ebo);
+ eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo);
if (eboflip) {
/* we assume X-axis flipping for now */
@@ -437,7 +437,7 @@ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone
eBone = MEM_callocN(sizeof(EditBone), "make_editbone");
/* Copy relevant data from bone to eBone
- * Keep selection logic in sync with ED_armature_sync_selection.
+ * Keep selection logic in sync with ED_armature_edit_sync_selection.
*/
eBone->parent = parent;
BLI_strncpy(eBone->name, curBone->name, sizeof(eBone->name));
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index 4eb9e3ecc79..57843265496 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -39,7 +39,7 @@ void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invma
copy_v3_v3(normal, no);
mul_m3_v3(tmat, normal);
- bone->roll = ED_rollBoneToVector(bone, normal, false);
+ bone->roll = ED_armature_ebone_roll_to_vector(bone, normal, false);
}
}
@@ -252,7 +252,7 @@ EditBone *subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *U
IT_head(iter);
- parent = ED_armature_edit_bone_add(arm, "Bone");
+ parent = ED_armature_ebone_add(arm, "Bone");
copy_v3_v3(parent->head, iter->p);
if (iter->size > FLT_EPSILON) {
@@ -265,7 +265,7 @@ EditBone *subdivideArcBy(ToolSettings *toolsettings, bArmature *arm, ListBase *U
while (index != -1) {
IT_peek(iter, index);
- child = ED_armature_edit_bone_add(arm, "Bone");
+ child = ED_armature_ebone_add(arm, "Bone");
copy_v3_v3(child->head, parent->tail);
child->parent = parent;
child->flag |= BONE_CONNECTED;
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 3dd41f25e09..bf6126658af 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -158,11 +158,11 @@ static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float q
if (angle_normalized_v3v3(x_axis, new_up_axis) < angle_normalized_v3v3(z_axis, new_up_axis)) {
rotation_between_vecs_to_quat(qroll, new_up_axis, x_axis); /* set roll rotation quat */
- return ED_rollBoneToVector(bone, x_axis, false);
+ return ED_armature_ebone_roll_to_vector(bone, x_axis, false);
}
else {
rotation_between_vecs_to_quat(qroll, new_up_axis, z_axis); /* set roll rotation quat */
- return ED_rollBoneToVector(bone, z_axis, false);
+ return ED_armature_ebone_roll_to_vector(bone, z_axis, false);
}
}
@@ -207,7 +207,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4]
/* real qroll between normal and up_axis */
rotation_between_vecs_to_quat(qroll, new_up_axis, normal);
- return ED_rollBoneToVector(edge->bone, normal, false);
+ return ED_armature_ebone_roll_to_vector(edge->bone, normal, false);
}
}
@@ -218,7 +218,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4])
copy_v3_v3(new_up_axis, old_up_axis);
mul_qt_v3(qrot, new_up_axis);
- return ED_rollBoneToVector(bone, new_up_axis, false);
+ return ED_armature_ebone_roll_to_vector(bone, new_up_axis, false);
}
/************************************ DESTRUCTORS ******************************************************/
@@ -424,7 +424,7 @@ static void renameTemplateBone(char *name, char *template_name, ListBase *editbo
name[j] = '\0';
- unique_editbone_name(editbones, name, NULL);
+ ED_armature_ebone_unique_name(editbones, name, NULL);
}
static RigControl *cloneControl(RigGraph *rg, RigGraph *src_rg, RigControl *src_ctrl, GHash *ptr_hash, char *side_string, char *num_string)
@@ -1435,7 +1435,7 @@ static EditBone *add_editbonetolist(char *name, ListBase *list)
EditBone *bone = MEM_callocN(sizeof(EditBone), "eBone");
BLI_strncpy(bone->name, name, sizeof(bone->name));
- unique_editbone_name(list, bone->name, NULL);
+ ED_armature_ebone_unique_name(list, bone->name, NULL);
BLI_addtail(list, bone);
@@ -2626,7 +2626,7 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
}
RIG_freeRigGraph((BGraph *)rigg);
- ED_armature_validate_active(armedit);
+ ED_armature_edit_validate_active(armedit);
// XXX
// allqueue(REDRAWVIEW3D, 0);
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 1f1468a8e41..26f11f8fd60 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -1358,7 +1358,7 @@ static void sk_convertStroke(bContext *C, SK_Stroke *stk)
}
if (bone == NULL) {
- bone = ED_armature_edit_bone_add(arm, "Bone");
+ bone = ED_armature_ebone_add(arm, "Bone");
copy_v3_v3(bone->head, head->p);
copy_v3_v3(bone->tail, pt->p);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 489940007e4..ea7a35a4b0e 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1636,7 +1636,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
free_bvhtree_from_mesh(&mdb->bvhdata);
}
-void mesh_deform_bind(
+void ED_mesh_deform_bind_callback(
Scene *scene, MeshDeformModifierData *mmd, DerivedMesh *cagedm,
float *vertexcos, int totvert, float cagemat[4][4])
{
diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h
index 05ade4fc43e..9c4ceacbee6 100644
--- a/source/blender/editors/armature/meshlaplacian.h
+++ b/source/blender/editors/armature/meshlaplacian.h
@@ -68,7 +68,7 @@ void rigid_deform_end(int cancel);
/* Harmonic Coordinates */
-/* mesh_deform_bind(...) defined in ED_armature.h */
+/* ED_mesh_deform_bind_callback(...) defined in ED_armature.h */
#endif
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index a66cedd8d4f..1c23f71233d 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -133,7 +133,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
/* called from editview.c, for mode-less pose selection */
/* assumes scene obact and basact is still on old situation */
-bool ED_do_pose_selectbuffer(
+bool ED_armature_pose_select_pick_with_buffer(
ViewLayer *view_layer, Base *base, const unsigned int *buffer, short hits,
bool extend, bool deselect, bool toggle, bool do_nearest)
{
@@ -166,7 +166,7 @@ bool ED_do_pose_selectbuffer(
}
if (!extend && !deselect && !toggle) {
- ED_pose_de_selectall(ob, SEL_DESELECT, true);
+ ED_pose_deselect_all(ob, SEL_DESELECT, true);
nearBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
arm->act_bone = nearBone;
}
@@ -220,7 +220,7 @@ bool ED_do_pose_selectbuffer(
/* '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). */
-void ED_pose_de_selectall(Object *ob, int select_mode, const bool ignore_visibility)
+void ED_pose_deselect_all(Object *ob, int select_mode, const bool ignore_visibility)
{
bArmature *arm = ob->data;
bPoseChannel *pchan;
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index c49591be5d1..7fc40d00042 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -128,7 +128,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
pose = ob->pose;
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
- curbone = ED_armature_bone_find_name(arm->edbo, pchan->name);
+ curbone = ED_armature_ebone_find_name(arm->edbo, pchan->name);
/* simply copy the head/tail values from pchan over to curbone */
copy_v3_v3(curbone->head, pchan->pose_head);