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/makesrna/intern/rna_scene_api.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/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 1b5077899f5..03032ac413e 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -161,9 +161,10 @@ static void rna_Scene_ray_cast(Scene *scene, normalize_v3(direction); Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); - SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, depsgraph, 0); + SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, 0); bool ret = ED_transform_snap_object_project_ray_ex(sctx, + depsgraph, &(const struct SnapObjectParams){ .snap_select = SNAP_ALL, }, |