Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_snap.c
| Context not available. | |||||
| void applySnapping(TransInfo *t, float *vec) | void applySnapping(TransInfo *t, float *vec) | ||||
| { | { | ||||
| /* early exit for overridden transform modes */ | |||||
| if (t->spacetype == SPACE_VIEW3D) { | |||||
| if ((t->mode == TFM_ROTATION || t->mode == TFM_RESIZE) && (t->settings->snap_increment_mode & SCE_SNAP_INCREMENT_OVERRIDE)) { | |||||
| return; | |||||
| } | |||||
| } | |||||
| if (t->tsnap.project && t->tsnap.mode == SCE_SNAP_MODE_FACE) { | if (t->tsnap.project && t->tsnap.mode == SCE_SNAP_MODE_FACE) { | ||||
| /* Each Trans Data already makes the snap to face */ | /* Each Trans Data already makes the snap to face */ | ||||
| return; | return; | ||||
| Context not available. | |||||
| return; | return; | ||||
| } | } | ||||
| /* exit if incremental snap has been disabled for these modes */ | |||||
| if (t->spacetype == SPACE_VIEW3D && | |||||
| ((t->mode == TFM_TRANSLATION && t->settings->snap_increment_mode & SCE_SNAP_INCREMENT_TRANSLATE) || | |||||
| (t->mode == TFM_ROTATION && t->settings->snap_increment_mode & SCE_SNAP_INCREMENT_ROTATE) || | |||||
| (t->mode == TFM_RESIZE && t->settings->snap_increment_mode & SCE_SNAP_INCREMENT_SCALE))) { | |||||
| return; | |||||
| } | |||||
| action = activeSnap(t) ? BIG_GEARS : NO_GEARS; | action = activeSnap(t) ? BIG_GEARS : NO_GEARS; | ||||
| if (action == BIG_GEARS && (t->modifiers & MOD_PRECISION)) { | if (action == BIG_GEARS && (t->modifiers & MOD_PRECISION)) { | ||||
| Context not available. | |||||