diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-03-09 16:02:11 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-03-09 16:02:11 +0300 |
commit | a922a097ef5c453bf4bc515494a3ab5f402946e2 (patch) | |
tree | 892f229d05ed6e88afc7d107bf58147f6031dd16 /source/blender/editors/space_view3d/view3d_walk.c | |
parent | 3a10c61a7d088712e66ae6cc775f8260dc91518b (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/space_view3d/view3d_walk.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index fcacc24b0c8..9f488a1ef78 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -375,6 +375,7 @@ static bool walk_floor_distance_get(RegionView3D *rv3d, add_v3_v3(ray_start, dvec_tmp); ret = ED_transform_snap_object_project_ray(walk->snap_context, + walk->depsgraph, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, }, @@ -413,6 +414,7 @@ static bool walk_ray_cast(RegionView3D *rv3d, normalize_v3(ray_normal); ret = ED_transform_snap_object_project_ray(walk->snap_context, + walk->depsgraph, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, }, @@ -551,7 +553,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op) walk->rv3d->rflag |= RV3D_NAVIGATING; walk->snap_context = ED_transform_snap_object_context_create_view3d( - bmain, walk->scene, CTX_data_ensure_evaluated_depsgraph(C), 0, walk->region, walk->v3d); + bmain, walk->scene, 0, walk->region, walk->v3d); walk->v3d_camera_control = ED_view3d_cameracontrol_acquire( walk->depsgraph, |