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/include/ED_transform_snap_object_context.h | |
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/include/ED_transform_snap_object_context.h')
-rw-r--r-- | source/blender/editors/include/ED_transform_snap_object_context.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_transform_snap_object_context.h b/source/blender/editors/include/ED_transform_snap_object_context.h index 34f2bf8361a..b998ac87819 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.h +++ b/source/blender/editors/include/ED_transform_snap_object_context.h @@ -79,11 +79,9 @@ struct SnapObjectParams { typedef struct SnapObjectContext SnapObjectContext; SnapObjectContext *ED_transform_snap_object_context_create(struct Main *bmain, struct Scene *scene, - struct Depsgraph *depsgraph, int flag); SnapObjectContext *ED_transform_snap_object_context_create_view3d(struct Main *bmain, struct Scene *scene, - struct Depsgraph *depsgraph, int flag, /* extra args for view3d */ const struct ARegion *region, @@ -99,6 +97,7 @@ void ED_transform_snap_object_context_set_editmesh_callbacks( void *user_data); bool ED_transform_snap_object_project_ray_ex(struct SnapObjectContext *sctx, + struct Depsgraph *depsgraph, const struct SnapObjectParams *params, const float ray_start[3], const float ray_normal[3], @@ -110,6 +109,7 @@ bool ED_transform_snap_object_project_ray_ex(struct SnapObjectContext *sctx, struct Object **r_ob, float r_obmat[4][4]); bool ED_transform_snap_object_project_ray(SnapObjectContext *sctx, + struct Depsgraph *depsgraph, const struct SnapObjectParams *params, const float ray_origin[3], const float ray_direction[3], @@ -118,6 +118,7 @@ bool ED_transform_snap_object_project_ray(SnapObjectContext *sctx, float r_no[3]); bool ED_transform_snap_object_project_ray_all(SnapObjectContext *sctx, + struct Depsgraph *depsgraph, const struct SnapObjectParams *params, const float ray_start[3], const float ray_normal[3], @@ -126,6 +127,7 @@ bool ED_transform_snap_object_project_ray_all(SnapObjectContext *sctx, struct ListBase *r_hit_list); short ED_transform_snap_object_project_view3d_ex(struct SnapObjectContext *sctx, + struct Depsgraph *depsgraph, const unsigned short snap_to, const struct SnapObjectParams *params, const float mval[2], @@ -137,6 +139,7 @@ short ED_transform_snap_object_project_view3d_ex(struct SnapObjectContext *sctx, struct Object **r_ob, float r_obmat[4][4]); bool ED_transform_snap_object_project_view3d(struct SnapObjectContext *sctx, + struct Depsgraph *depsgraph, const unsigned short snap_to, const struct SnapObjectParams *params, const float mval[2], @@ -147,6 +150,7 @@ bool ED_transform_snap_object_project_view3d(struct SnapObjectContext *sctx, float r_no[3]); bool ED_transform_snap_object_project_all_view3d_ex(SnapObjectContext *sctx, + struct Depsgraph *depsgraph, const struct SnapObjectParams *params, const float mval[2], float ray_depth, |