diff options
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 400c351a5d5..62afc6ea1b5 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1682,6 +1682,16 @@ bool transform_snap_increment(const TransInfo *t, float *r_val) return transform_snap_increment_ex(t, false, r_val); } +float transform_snap_increment_get(const TransInfo *t) +{ + if (activeSnap(t) && (!transformModeUseSnap(t) || + (t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID)))) { + return (t->modifiers & MOD_PRECISION) ? t->snap[1] : t->snap[0]; + } + + return 0.0f; +} + /** \} */ /* -------------------------------------------------------------------- */ |