Fix T101964: Edge and face snapping no locking to axis
In rBed6c8d82b804 it was wrongly assumed that the constraint functions always apply the transformations. But that is not the case for when axes are aligned. The `mul_m3_v3(t->con.pmtx, out)` fallback is still required.
This commit is contained in:
parent
d6d0643265
commit
4ffbc6175e
Notes:
blender-bot
2023-02-14 05:25:44 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3 Referenced by issue #101964, Regression: Edge snapping and face project snapping no longer locks to axis
|
@ -404,9 +404,11 @@ static void applyAxisConstraintVec(const TransInfo *t,
|
|||
}
|
||||
}
|
||||
|
||||
/* Fallback for when axes are aligned. */
|
||||
mul_m3_v3(t->con.pmtx, out);
|
||||
|
||||
if (is_snap_to_point) {
|
||||
/* With snap points, a projection is alright, no adjustments needed. */
|
||||
mul_m3_v3(t->con.pmtx, out);
|
||||
/* Pass. With snap points, a projection is alright, no adjustments needed. */
|
||||
}
|
||||
else {
|
||||
const int dims = getConstraintSpaceDimension(t);
|
||||
|
@ -422,14 +424,9 @@ static void applyAxisConstraintVec(const TransInfo *t,
|
|||
/* Disabled, as it has not proven to be really useful. (See T82386). */
|
||||
// constraint_snap_plane_to_face(t, plane, out);
|
||||
}
|
||||
else {
|
||||
else if (!isPlaneProjectionViewAligned(t, plane)) {
|
||||
/* View alignment correction. */
|
||||
if (!isPlaneProjectionViewAligned(t, plane)) {
|
||||
planeProjection(t, plane, in, out);
|
||||
}
|
||||
else {
|
||||
mul_m3_v3(t->con.pmtx, out);
|
||||
}
|
||||
planeProjection(t, plane, in, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue