diff options
author | Germano <germano.costa@ig.com.br> | 2018-05-15 20:32:30 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-05-15 20:32:30 +0300 |
commit | 50c29e239114b7f5dd533ec080fc75f4fbda6a99 (patch) | |
tree | 093df756bbb39de5d35a912e03633ed1596e23ec /source/blender/editors/transform/transform_snap_object.c | |
parent | 717dd4cecd2ea8eaa7b3bbfb5a5c7ec65f0337c0 (diff) |
Cleanup: pass the use_depth parameter to the `SnapObjectParams` struct in the ED_transform_snap_object_project_view3d_mixed.
Diffstat (limited to 'source/blender/editors/transform/transform_snap_object.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 4e9fd01ba8a..2419ab7ec92 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -2122,7 +2122,6 @@ static bool transform_snap_context_project_view3d_mixed_impl( const unsigned short snap_to_flag, const struct SnapObjectParams *params, const float mval[2], float *dist_px, - bool use_depth, float r_co[3], float r_no[3]) { float ray_depth = BVH_RAYCAST_DIST_MAX; @@ -2133,7 +2132,7 @@ static bool transform_snap_context_project_view3d_mixed_impl( BLI_assert(snap_to_flag != 0); BLI_assert((snap_to_flag & ~(1 | 2 | 4)) == 0); - if (use_depth) { + if (params->use_occlusion_test) { const float dist_px_orig = dist_px ? *dist_px : 0; for (int i = 2; i >= 0; i--) { if (snap_to_flag & (1 << i)) { @@ -2182,7 +2181,6 @@ static bool transform_snap_context_project_view3d_mixed_impl( * \param sctx: Snap context. * \param mval_fl: Screenspace coordinate. * \param dist_px: Maximum distance to snap (in pixels). - * \param use_depth: Snap to the closest element, use when using more than one snap type. * \param r_co: hit location. * \param r_no: hit normal (optional). * \return Snap success @@ -2192,13 +2190,12 @@ bool ED_transform_snap_object_project_view3d_mixed( const unsigned short snap_to_flag, const struct SnapObjectParams *params, const float mval_fl[2], float *dist_px, - bool use_depth, float r_co[3], float r_no[3]) { return transform_snap_context_project_view3d_mixed_impl( sctx, snap_to_flag, params, - mval_fl, dist_px, use_depth, + mval_fl, dist_px, r_co, r_no); } |