Transform: Support mixed snap in 3d View.

Allows more than one snap mode to be enabled. So different combinations are possible.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: Christopher_Anderssarian, duarteframos

Tags: #bf_blender_2.8

Differential Revision: D3400
This commit is contained in:
2018-05-22 08:58:56 -03:00
parent 47b9d7494e
commit f99197fb2d
16 changed files with 211 additions and 193 deletions

View File

@@ -343,8 +343,7 @@ static void applyAxisConstraintVec(
mul_m3_v3(t->con.pmtx, out);
// With snap, a projection is alright, no need to correct for view alignment
if (!(!ELEM(t->tsnap.mode, SCE_SNAP_MODE_INCREMENT, SCE_SNAP_MODE_GRID) && activeSnap(t))) {
if (!validSnap(t)) {
const int dims = getConstraintSpaceDimension(t);
if (dims == 2) {
if (!is_zero_v3(out)) {