[Bf-blender-cvs] [08ba057eef7] blender2.8: Fix misuse of the `use_occlusion_test` parameter.

Germano noreply at git.blender.org
Mon May 21 17:12:30 CEST 2018


Commit: 08ba057eef7557d7f7b0bfa73ea98ce010d24902
Author: Germano
Date:   Mon May 21 11:17:19 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB08ba057eef7557d7f7b0bfa73ea98ce010d24902

Fix misuse of the `use_occlusion_test` parameter.

===================================================================

M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/space_view3d/view3d_manipulator_ruler.c
M	source/blender/editors/space_view3d/view3d_ruler.c

===================================================================

diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 7e540ee074a..21131b2017d 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -5021,7 +5021,6 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 			        &(const struct SnapObjectParams){
 			            .snap_select = (vc.obedit != NULL) ? SNAP_NOT_ACTIVE : SNAP_ALL,
 			            .use_object_edit_cage = false,
-			            .use_occlusion_test = true,
 			        },
 			        mval, NULL,
 			        location, NULL);
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_ruler.c b/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
index d46673b4817..773b47d45f2 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
@@ -326,7 +326,6 @@ static bool view3d_ruler_item_mousemove(
 			        &(const struct SnapObjectParams){
 			            .snap_select = SNAP_ALL,
 			            .use_object_edit_cage = true,
-			            .use_occlusion_test = true,
 			        },
 			        mval_fl, &dist_px,
 			        co, ray_normal))
@@ -348,15 +347,14 @@ static bool view3d_ruler_item_mousemove(
 			// Scene *scene = CTX_data_scene(C);
 			View3D *v3d = ruler_info->sa->spacedata.first;
 			const float mval_fl[2] = {UNPACK2(mval)};
-			bool use_depth = (v3d->drawtype >= OB_SOLID);
 
 			if (ED_transform_snap_object_project_view3d_mixed(
 			        ruler_info->snap_context,
-			        (SCE_SELECT_VERTEX | SCE_SELECT_EDGE) | (use_depth ? SCE_SELECT_FACE : 0),
+			        (SCE_SELECT_VERTEX | SCE_SELECT_EDGE | SCE_SELECT_FACE),
 			        &(const struct SnapObjectParams){
 			            .snap_select = SNAP_ALL,
 			            .use_object_edit_cage = true,
-			            .use_occlusion_test = use_depth,
+			            .use_occlusion_test = true,
 			        },
 			        mval_fl, &dist_px,
 			        co, NULL))
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index 64b5d32191f..f0f7554408e 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -767,7 +767,6 @@ static bool view3d_ruler_item_mousemove(
 			        &(const struct SnapObjectParams){
 			            .snap_select = SNAP_ALL,
 			            .use_object_edit_cage = true,
-			            .use_occlusion_test = true,
 			        },
 			        mval_fl, &dist_px,
 			        co, ray_normal))
@@ -789,15 +788,14 @@ static bool view3d_ruler_item_mousemove(
 			// Scene *scene = CTX_data_scene(C);
 			View3D *v3d = ruler_info->sa->spacedata.first;
 			const float mval_fl[2] = {UNPACK2(mval)};
-			bool use_depth = (v3d->drawtype >= OB_SOLID);
 
 			if (ED_transform_snap_object_project_view3d_mixed(
 			        ruler_info->snap_context,
-			        (SCE_SELECT_VERTEX | SCE_SELECT_EDGE) | (use_depth ? SCE_SELECT_FACE : 0),
+			        (SCE_SELECT_VERTEX | SCE_SELECT_EDGE | SCE_SELECT_FACE),
 			        &(const struct SnapObjectParams){
 			            .snap_select = SNAP_ALL,
 			            .use_object_edit_cage = true,
-			            .use_occlusion_test = use_depth,
+			            .use_occlusion_test = true,
 			        },
 			        mval_fl, &dist_px,
 			        co, NULL))



More information about the Bf-blender-cvs mailing list