diff options
author | Germano <germano.costa@ig.com.br> | 2018-06-02 19:11:51 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-06-02 19:11:51 +0300 |
commit | 6de656b4f2ac66922d34bedbeb8f857bc878c5ae (patch) | |
tree | 4b2edec8d7478b3b015adea1aff96dd6363b461d /source/blender/editors | |
parent | 58efa7d686351d31c8eefe77464ef606369e939c (diff) |
transform_snap_object: Do not use occlusion test when X-Ray is enabled.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index d3092fa18cd..5932a35bf2b 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -2467,7 +2467,11 @@ static short transform_snap_context_project_view3d_mixed_impl( const ARegion *ar = sctx->v3d_data.ar; const RegionView3D *rv3d = ar->regiondata; - if (snap_to_flag & SCE_SNAP_MODE_FACE || params->use_occlusion_test) { + bool use_occlusion_test = + params->use_occlusion_test && + !(sctx->v3d_data.v3d->shading.flag & V3D_SHADING_XRAY); + + if (snap_to_flag & SCE_SNAP_MODE_FACE || use_occlusion_test) { float ray_start[3], ray_normal[3]; if (!ED_view3d_win_to_ray_ex( |