Fix for align bone to cursor (missing normalize)
This commit is contained in:
@@ -296,10 +296,12 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
|
|||||||
float cursor_rel[3];
|
float cursor_rel[3];
|
||||||
sub_v3_v3v3(cursor_rel, cursor_local, ebone->head);
|
sub_v3_v3v3(cursor_rel, cursor_local, ebone->head);
|
||||||
if (axis_flip) negate_v3(cursor_rel);
|
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_rollBoneToVector(ebone, cursor_rel, axis_only);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (ELEM(type, CALC_ROLL_TAN_X, CALC_ROLL_TAN_Z)) {
|
else if (ELEM(type, CALC_ROLL_TAN_X, CALC_ROLL_TAN_Z)) {
|
||||||
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
|
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
|
||||||
if (ebone->parent) {
|
if (ebone->parent) {
|
||||||
|
Reference in New Issue
Block a user