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>2020-03-09 16:02:11 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-03-09 16:02:11 +0300
commita922a097ef5c453bf4bc515494a3ab5f402946e2 (patch)
tree892f229d05ed6e88afc7d107bf58147f6031dd16 /source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
parent3a10c61a7d088712e66ae6cc775f8260dc91518b (diff)
Transform Snap Object: Remove depsgraph when creating context
Currently, this change does not bring functional changes. But it is necessary to extend the use of the snap system for gizmos, since, after a Undo, the `depsgraph` pointed by the `snap_context` has its memory invalidated. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D7013
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.c8
1 files changed, 2 insertions, 6 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 f7b51a7a0cb..d8cd4d20579 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
@@ -276,6 +276,7 @@ static int gizmo_move_modal(bContext *C,
float co[3];
if (ED_transform_snap_object_project_view3d(
inter->snap_context_v3d,
+ CTX_data_ensure_evaluated_depsgraph(C),
(SCE_SNAP_MODE_VERTEX | SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE),
&(const struct SnapObjectParams){
.snap_select = SNAP_ALL,
@@ -369,12 +370,7 @@ static int gizmo_move_invoke(bContext *C, wmGizmo *gz, const wmEvent *event)
switch (sa->spacetype) {
case SPACE_VIEW3D: {
inter->snap_context_v3d = ED_transform_snap_object_context_create_view3d(
- CTX_data_main(C),
- CTX_data_scene(C),
- CTX_data_ensure_evaluated_depsgraph(C),
- 0,
- CTX_wm_region(C),
- CTX_wm_view3d(C));
+ CTX_data_main(C), CTX_data_scene(C), 0, CTX_wm_region(C), CTX_wm_view3d(C));
break;
}
default: