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-10-12 23:05:56 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-10-13 23:43:29 +0300
commit91c33c8b99520b6b094265a826cd391929a81716 (patch)
treead5f250137549de94c0ea4c93a5a5643ceaf3692 /source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
parent988b9bc40ce846cdce05961315dc0e2c1dd95e4b (diff)
Cleanup: Snap Context Refactor
Move runtime parameters out of context creation. Not being able to choose another region and v3d limits the use of the snap API.
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
index 68322ed56af..ec4837aec3c 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
@@ -289,6 +289,8 @@ static int gizmo_move_modal(bContext *C,
if (ED_transform_snap_object_project_view3d(
inter->snap_context_v3d,
CTX_data_ensure_evaluated_depsgraph(C),
+ region,
+ CTX_wm_view3d(C),
(SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE),
&(const struct SnapObjectParams){
.snap_select = SNAP_ALL,
@@ -381,8 +383,7 @@ static int gizmo_move_invoke(bContext *C, wmGizmo *gz, const wmEvent *event)
if (area) {
switch (area->spacetype) {
case SPACE_VIEW3D: {
- inter->snap_context_v3d = ED_transform_snap_object_context_create_view3d(
- CTX_data_scene(C), 0, CTX_wm_region(C), CTX_wm_view3d(C));
+ inter->snap_context_v3d = ED_transform_snap_object_context_create(CTX_data_scene(C), 0);
break;
}
default: