diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-01 18:32:59 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-01 18:32:59 +0300 |
commit | 76cdcc2bcadc8a8fecd2254ec767169b34893c6d (patch) | |
tree | 51537809f0eeaf5837e255cc7ec0de204d787dc9 /source/blender/editors/include | |
parent | 5da5fb31db199e9aa0a661dcb8ed5b0e2442455d (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')
-rw-r--r-- | source/blender/editors/include/ED_gizmo_library.h | 10 |
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, |