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/space_view3d
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/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_placement.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index b0dfd4af7c5..8172742a756 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -1499,7 +1499,7 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
ipd->is_snap_found = false;
if (ipd->use_snap) {
if (ipd->snap_gizmo != NULL) {
- ED_gizmotypes_snap_3d_toggle_set(ipd->snap_gizmo, ipd->use_snap);
+ ED_gizmotypes_snap_3d_flag_set(ipd->snap_gizmo, ED_SNAPGIZMO_TOGGLE_ALWAYS_TRUE);
if (ED_gizmotypes_snap_3d_update(ipd->snap_gizmo,
CTX_data_ensure_evaluated_depsgraph(C),
ipd->region,
@@ -1509,7 +1509,7 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
ED_gizmotypes_snap_3d_data_get(ipd->snap_gizmo, ipd->snap_co, NULL, NULL, NULL);
ipd->is_snap_found = true;
}
- ED_gizmotypes_snap_3d_toggle_clear(ipd->snap_gizmo);
+ ED_gizmotypes_snap_3d_flag_clear(ipd->snap_gizmo, ED_SNAPGIZMO_TOGGLE_ALWAYS_TRUE);
}
}