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/curve | |
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/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index ee1a48e9f1e..6fdf76bfb75 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -5677,10 +5677,11 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event) const float mval[2] = {UNPACK2(event->mval)}; struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( - vc.bmain, vc.scene, vc.depsgraph, 0, vc.region, vc.v3d); + vc.bmain, vc.scene, 0, vc.region, vc.v3d); ED_transform_snap_object_project_view3d( snap_context, + vc.depsgraph, SCE_SNAP_MODE_FACE, &(const struct SnapObjectParams){ .snap_select = (vc.obedit != NULL) ? SNAP_NOT_ACTIVE : SNAP_ALL, |