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:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-10-21 15:52:53 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-10-21 15:53:07 +0300
commitf0ebf696cbbb521f956c5b612037f4d11e87cb0d (patch)
treed1f57323b3ddf6f96b756b859c28513f26b6361b
parent899d4ddbd08cdb8130894c9de8533d5bb98214be (diff)
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.
-rw-r--r--source/blender/editors/transform/transform_constraints.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index fa56456d8e7..7abf0e5c00c 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -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);
}
}
}