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>2021-04-01 18:32:59 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-04-01 18:32:59 +0300
commit76cdcc2bcadc8a8fecd2254ec767169b34893c6d (patch)
tree51537809f0eeaf5837e255cc7ec0de204d787dc9 /source/blender/editors/include/ED_gizmo_library.h
parent5da5fb31db199e9aa0a661dcb8ed5b0e2442455d (diff)
Cleanup/Refactor: Use flags instead of bool to configure the snap gizmo
This simplifies the addition of future improvements. Also make it more practical to expose as a parameter of gizmo for Python.
Diffstat (limited to 'source/blender/editors/include/ED_gizmo_library.h')
-rw-r--r--source/blender/editors/include/ED_gizmo_library.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h
index 1c795896f86..58b2cb80bbe 100644
--- a/source/blender/editors/include/ED_gizmo_library.h
+++ b/source/blender/editors/include/ED_gizmo_library.h
@@ -261,9 +261,15 @@ struct SnapObjectContext *ED_gizmotypes_snap_3d_context_ensure(struct Scene *sce
const struct View3D *v3d,
struct wmGizmo *gz);
+typedef enum {
+ ED_SNAPGIZMO_TOGGLE_ALWAYS_TRUE = 1 << 0,
+} eSnapGizmo;
+
+void ED_gizmotypes_snap_3d_flag_set(struct wmGizmo *gz, eSnapGizmo flag);
+void ED_gizmotypes_snap_3d_flag_clear(struct wmGizmo *gz, eSnapGizmo flag);
+bool ED_gizmotypes_snap_3d_flag_test(struct wmGizmo *gz, eSnapGizmo flag);
+
bool ED_gizmotypes_snap_3d_invert_snap_get(struct wmGizmo *gz);
-void ED_gizmotypes_snap_3d_toggle_set(struct wmGizmo *gz, bool enable);
-void ED_gizmotypes_snap_3d_toggle_clear(struct wmGizmo *gz);
bool ED_gizmotypes_snap_3d_is_enabled(struct wmGizmo *gz);
short ED_gizmotypes_snap_3d_update(struct wmGizmo *gz,