Anim: Align new bones with the world axes #113138

Open
Sybren A. Stüvel wants to merge 2 commits from dr.sybren/blender:pr/align-default-bone-to-y into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 1 additions and 7 deletions
Showing only changes of commit e31989a726 - Show all commits

View File

@ -1655,13 +1655,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
ANIM_armature_bonecoll_assign_active(static_cast<bArmature *>(obedit->data), bone);
copy_v3_v3(bone->head, curs);
if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) {
add_v3_v3v3(bone->tail, bone->head, imat[1]); /* bone with unit length 1 */
}
else {
add_v3_v3v3(bone->tail, bone->head, imat[2]); /* bone with unit length 1, pointing up Z */
}
add_v3_v3v3(bone->tail, bone->head, imat[1]); /* bone with unit length 1 */
/* NOTE: notifier might evolve. */
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);