Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-06-07 04:59:32 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-06-07 06:38:23 +0300
commitea182deeb9cdd2a9137e98eb0072f57c0fb1e09f (patch)
treea15fcaed353ebd957212ea5e871cde2fbd6bd2bd /source/blender/editors/transform/transform_snap.c
parentb3101abcce967c1a623c9e732199b69140a210c0 (diff)
Remove workaround for drawing the rotation gizmo
Since [0], transform gizmos are no longer hidden during transform. The same can be observed for rotation gizmos. However, as a workaround for these rotation gizmos, there was already a drawing utility running. With the gizmo and the utility this drawing is now being done twice. So remove the utility/workaround and update the gizmo accordingly. [0] {648350e456490f8d6258e7de9bf94d3a6a34dbb2} Differential Revision: https://developer.blender.org/D9542
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r--source/blender/editors/transform/transform_snap.c10
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;
+}
+
/** \} */
/* -------------------------------------------------------------------- */