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-03-29 20:32:48 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-03-29 20:32:48 +0300
commit661e6e096648bec6d696853b8e5f50dbb1a38472 (patch)
treed72d49e41126d3d94fe0007b54d06d7fc8f1142a /source/blender/editors/space_view3d
parentd0dd85a820ff9031f8bb52ccbe71220638736535 (diff)
Gizmo: Use a utility function to read snap gizmo values
No functional changes. This makes the `ED_gizmotypes_snap_3d_update` function more specialized.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_placement.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index 870996ddefa..833901b6770 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -387,7 +387,9 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph,
}
ED_gizmotypes_snap_3d_update(
- snap_gizmo, depsgraph, ruler_info->region, v3d, ruler_info->wm, mval_fl, co, NULL);
+ snap_gizmo, depsgraph, ruler_info->region, v3d, ruler_info->wm, mval_fl);
+
+ ED_gizmotypes_snap_3d_data_get(snap_gizmo, co, NULL, NULL, NULL);
}
return true;
}
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index 48f274ca71b..b0dfd4af7c5 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -1058,9 +1058,7 @@ static void view3d_interactive_add_begin(bContext *C, wmOperator *op, const wmEv
ipd->region,
ipd->v3d,
G_MAIN->wm.first,
- mval_fl,
- NULL,
- NULL);
+ mval_fl);
}
}
@@ -1507,9 +1505,8 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve
ipd->region,
ipd->v3d,
G_MAIN->wm.first,
- mval_fl,
- ipd->snap_co,
- NULL)) {
+ mval_fl)) {
+ 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);