diff options
Diffstat (limited to 'source/blender/editors/armature/armature_edit.c')
-rw-r--r-- | source/blender/editors/armature/armature_edit.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 9a4a0eecfcd..3879d67964c 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -66,7 +66,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(Scene *scene, Object *ob, float cursor[3], int cente /* 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(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); |