Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_constraints.c
| Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Lines | |||||
| static void applyAxisConstraintVec(TransInfo *t, TransData *td, const float in[3], float out[3], float pvec[3]) | static void applyAxisConstraintVec(TransInfo *t, TransData *td, const float in[3], float out[3], float pvec[3]) | ||||
| { | { | ||||
| copy_v3_v3(out, in); | copy_v3_v3(out, in); | ||||
| if (!td && t->con.mode & CON_APPLY) { | if (!td && t->con.mode & CON_APPLY) { | ||||
| mul_m3_v3(t->con.pmtx, out); | mul_m3_v3(t->con.pmtx, out); | ||||
| // With snap, a projection is alright, no need to correct for view alignment | // With snap, a projection is alright, no need to correct for view alignment | ||||
| if (!(t->tsnap.mode != SCE_SNAP_MODE_INCREMENT && activeSnap(t))) { | if (ELEM(t->tsnap.mode, SCE_SNAP_MODE_INCREMENT, SCE_SNAP_MODE_GRID) || activeSnap(t)) { | ||||
| if (getConstraintSpaceDimension(t) == 2) { | if (getConstraintSpaceDimension(t) == 2) { | ||||
| if (out[0] != 0.0f || out[1] != 0.0f || out[2] != 0.0f) { | if (out[0] != 0.0f || out[1] != 0.0f || out[2] != 0.0f) { | ||||
| planeProjection(t, in, out); | planeProjection(t, in, out); | ||||
| } | } | ||||
| } | } | ||||
| else if (getConstraintSpaceDimension(t) == 1) { | else if (getConstraintSpaceDimension(t) == 1) { | ||||
| float c[3]; | float c[3]; | ||||
| ▲ Show 20 Lines • Show All 775 Lines • Show Last 20 Lines | |||||