Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_mode_translate.c
| Show First 20 Lines • Show All 383 Lines • ▼ Show 20 Lines | else { | ||||
| if (t->con.mode & CON_APPLY) { | if (t->con.mode & CON_APPLY) { | ||||
| float in[3]; | float in[3]; | ||||
| copy_v3_v3(in, global_dir); | copy_v3_v3(in, global_dir); | ||||
| t->con.applyVec(t, NULL, NULL, in, global_dir); | t->con.applyVec(t, NULL, NULL, in, global_dir); | ||||
| } | } | ||||
| float incr_dir[3]; | float incr_dir[3]; | ||||
| mul_v3_m3v3(incr_dir, t->spacemtx_inv, global_dir); | mul_v3_m3v3(incr_dir, t->spacemtx_inv, global_dir); | ||||
| if (transform_snap_increment(t, incr_dir)) { | if (!(activeSnap(t) && validSnap(t)) && transform_snap_increment(t, incr_dir)) { | ||||
| mul_v3_m3v3(incr_dir, t->spacemtx, incr_dir); | mul_v3_m3v3(incr_dir, t->spacemtx, incr_dir); | ||||
| /* Test for mixed snap with grid. */ | /* Test for mixed snap with grid. */ | ||||
| float snap_dist_sq = FLT_MAX; | float snap_dist_sq = FLT_MAX; | ||||
| if (t->tsnap.snapElem != 0) { | if (t->tsnap.snapElem != 0) { | ||||
| snap_dist_sq = len_squared_v3v3(t->values, global_dir); | snap_dist_sq = len_squared_v3v3(t->values, global_dir); | ||||
| } | } | ||||
| if ((snap_dist_sq == FLT_MAX) || (len_squared_v3v3(global_dir, incr_dir) < snap_dist_sq)) { | if ((snap_dist_sq == FLT_MAX) || (len_squared_v3v3(global_dir, incr_dir) < snap_dist_sq)) { | ||||
| ▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines | |||||