[Bf-blender-cvs] [7ecc7c46af4] blender2.8: Merge branch 'master' into blender2.8

Campbell Barton noreply at git.blender.org
Sun Mar 11 06:04:28 CET 2018


Commit: 7ecc7c46af493f984e9cb2f08ac75da5b30ffd35
Author: Campbell Barton
Date:   Sun Mar 11 16:08:12 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB7ecc7c46af493f984e9cb2f08ac75da5b30ffd35

Merge branch 'master' into blender2.8

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



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

diff --cc source/blender/editors/space_view3d/view3d_select.c
index a90a719b556,1f9f941a507..5614ba9b0db
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@@ -461,9 -485,7 +464,9 @@@ static void do_lasso_select_mesh__doSel
  	}
  }
  
 -static void do_lasso_select_mesh(ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
 +static void do_lasso_select_mesh(
-         const struct EvaluationContext *eval_ctx, ViewContext *vc,
++        const EvaluationContext *eval_ctx, ViewContext *vc,
 +        const int mcords[][2], short moves, bool extend, bool select)
  {
  	LassoSelectUserData data;
  	ToolSettings *ts = vc->scene->toolsettings;
@@@ -709,7 -734,7 +715,9 @@@ static void do_lasso_select_meshobject_
  		SET_FLAG_FROM_TEST(mv->flag, data->select, SELECT);
  	}
  }
- static void do_lasso_select_paintvert(const struct EvaluationContext *eval_ctx, ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
 -static void do_lasso_select_paintvert(ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
++static void do_lasso_select_paintvert(
++        const EvaluationContext *eval_ctx,
++        ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
  {
  	const bool use_zbuf = (vc->v3d->flag & V3D_ZBUF_SELECT) != 0;
  	Object *ob = vc->obact;
@@@ -740,8 -765,8 +748,8 @@@
  
  		ED_view3d_init_mats_rv3d(vc->obact, vc->rv3d);
  
- 		meshobject_foreachScreenVert(eval_ctx, vc, do_lasso_select_meshobject__doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT);
 -		meshobject_foreachScreenVert(vc, do_lasso_select_meshobject__doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT);
--
++		meshobject_foreachScreenVert(
++		        eval_ctx, vc, do_lasso_select_meshobject__doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT);
  	}
  
  	if (select == false) {
@@@ -749,7 -774,7 +757,9 @@@
  	}
  	paintvert_flush_flags(ob);
  }
- static void do_lasso_select_paintface(const struct EvaluationContext *eval_ctx, ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
 -static void do_lasso_select_paintface(ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
++static void do_lasso_select_paintface(
++        const EvaluationContext *eval_ctx,
++        ViewContext *vc, const int mcords[][2], short moves, bool extend, bool select)
  {
  	Object *ob = vc->obact;
  	Mesh *me = ob->data;
@@@ -1394,13 -1410,14 +1406,14 @@@ static bool ed_object_select_pick
  		else {
  			base = startbase;
  			while (base) {
 -				if (BASE_SELECTABLE(v3d, base)) {
 +				if (BASE_SELECTABLE(base)) {
  					float screen_co[2];
- 					if (ED_view3d_project_float_global(ar, base->object->obmat[3], screen_co,
- 					                                   V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
+ 					if (ED_view3d_project_float_global(
+ 					            ar, base->object->obmat[3], screen_co,
+ 					            V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
  					{
  						float dist_temp = len_manhattan_v2v2(mval_fl, screen_co);
 -						if (base == BASACT) dist_temp += 10.0f;
 +						if (base == BASACT(view_layer)) dist_temp += 10.0f;
  						if (dist_temp < dist) {
  							dist = dist_temp;
  							basact = base;
@@@ -1609,7 -1624,7 +1623,8 @@@ bool edge_inside_circle(const float cen
  	return (dist_squared_to_line_segment_v2(cent, screen_co_a, screen_co_b) < radius_squared);
  }
  
--static void do_paintvert_box_select__doSelectVert(void *userData, MVert *mv, const float screen_co[2], int UNUSED(index))
++static void do_paintvert_box_select__doSelectVert(
++        void *userData, MVert *mv, const float screen_co[2], int UNUSED(index))
  {
  	BoxSelectUserData *data = userData;
  
@@@ -1805,8 -1821,7 +1822,8 @@@ static void do_mesh_box_select__doSelec
  		BM_face_select_set(data->vc->em->bm, efa, data->select);
  	}
  }
 -static int do_mesh_box_select(ViewContext *vc, rcti *rect, bool select, bool extend)
 +static int do_mesh_box_select(
-         const struct EvaluationContext *eval_ctx, ViewContext *vc, rcti *rect, bool select, bool extend)
++        const EvaluationContext *eval_ctx, ViewContext *vc, rcti *rect, bool select, bool extend)
  {
  	BoxSelectUserData data;
  	ToolSettings *ts = vc->scene->toolsettings;
@@@ -1859,9 -1874,7 +1876,9 @@@
  	return OPERATOR_FINISHED;
  }
  
 -static int do_meta_box_select(ViewContext *vc, rcti *rect, bool select, bool extend)
 +static int do_meta_box_select(
-         const struct EvaluationContext *eval_ctx, ViewContext *vc,
++        const EvaluationContext *eval_ctx, ViewContext *vc,
 +        const rcti *rect, bool select, bool extend)
  {
  	MetaBall *mb = (MetaBall *)vc->obedit->data;
  	MetaElem *ml;
@@@ -1895,9 -1908,7 +1912,9 @@@
  	return OPERATOR_FINISHED;
  }
  
 -static int do_armature_box_select(ViewContext *vc, rcti *rect, bool select, bool extend)
 +static int do_armature_box_select(
-         const struct EvaluationContext *eval_ctx, ViewContext *vc,
++        const EvaluationContext *eval_ctx, ViewContext *vc,
 +        const rcti *rect, bool select, bool extend)
  {
  	bArmature *arm = vc->obedit->data;
  	EditBone *ebone;
@@@ -2412,7 -2394,7 +2431,9 @@@ static void mesh_circle_doSelectFace(vo
  	}
  }
  
- static void mesh_circle_select(const struct EvaluationContext *eval_ctx, ViewContext *vc, const bool select, const int mval[2], float rad)
 -static void mesh_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad)
++static void mesh_circle_select(
++        const EvaluationContext *eval_ctx,
++        ViewContext *vc, const bool select, const int mval[2], float rad)
  {
  	ToolSettings *ts = vc->scene->toolsettings;
  	int bbsel;
@@@ -2456,7 -2438,7 +2477,9 @@@
  	EDBM_selectmode_flush(vc->em);
  }
  
- static void paint_facesel_circle_select(const struct EvaluationContext *eval_ctx, ViewContext *vc, const bool select, const int mval[2], float rad)
 -static void paint_facesel_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad)
++static void paint_facesel_circle_select(
++        const EvaluationContext *eval_ctx,
++        ViewContext *vc, const bool select, const int mval[2], float rad)
  {
  	Object *ob = vc->obact;
  	Mesh *me = ob->data;
@@@ -2480,7 -2463,7 +2504,8 @@@ static void paint_vertsel_circle_select
  		SET_FLAG_FROM_TEST(mv->flag, data->select, SELECT);
  	}
  }
- static void paint_vertsel_circle_select(const struct EvaluationContext *eval_ctx, ViewContext *vc, const bool select, const int mval[2], float rad)
 -static void paint_vertsel_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad)
++static void paint_vertsel_circle_select(
++        const EvaluationContext *eval_ctx, ViewContext *vc, const bool select, const int mval[2], float rad)
  {
  	const bool use_zbuf = (vc->v3d->flag & V3D_ZBUF_SELECT) != 0;
  	Object *ob = vc->obact;
@@@ -2503,7 -2486,7 +2528,8 @@@
  		ED_view3d_init_mats_rv3d(vc->obact, vc->rv3d); /* for foreach's screen/vert projection */
  
  		view3d_userdata_circleselect_init(&data, vc, select, mval, rad);
- 		meshobject_foreachScreenVert(eval_ctx, vc, paint_vertsel_circle_select_doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT);
 -		meshobject_foreachScreenVert(vc, paint_vertsel_circle_select_doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT);
++		meshobject_foreachScreenVert(
++		        eval_ctx, vc, paint_vertsel_circle_select_doSelectVert, &data, V3D_PROJ_TEST_CLIP_DEFAULT);
  	}
  
  	if (select != LEFTMOUSE) {
@@@ -2757,8 -2743,7 +2786,8 @@@ static void mball_circle_select(ViewCon
  
  /** Callbacks for circle selection in Editmode */
  
 -static void obedit_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad)
 +static void obedit_circle_select(
-         const struct EvaluationContext *eval_ctx, ViewContext *vc, const bool select, const int mval[2], float rad)
++        const EvaluationContext *eval_ctx, ViewContext *vc, const bool select, const int mval[2], float rad)
  {
  	switch (vc->obedit->type) {
  		case OB_MESH:
@@@ -2792,14 -2777,15 +2821,15 @@@ static bool object_circle_select(ViewCo
  
  
  	Base *base;
 -	for (base = FIRSTBASE; base; base = base->next) {
 -		if (BASE_SELECTABLE(vc->v3d, base) && ((base->flag & SELECT) != select_flag)) {
 +	for (base = FIRSTBASE(view_layer); base; base = base->next) {
 +		if (BASE_SELECTABLE(base) && ((base->flag & BASE_SELECTED) != select_flag)) {
  			float screen_co[2];
- 			if (ED_view3d_project_float_global(vc->ar, base->object->obmat[3], screen_co,
- 			                                   V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
+ 			if (ED_view3d_project_float_global(
+ 			            vc->ar, base->object->obmat[3], screen_co,
+ 			            V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
  			{
  				if (len_squared_v2v2(mval_fl, screen_co) <= radius_squared) {
 -					ED_base_object_select(base, select ? BA_SELECT : BA_DESELECT);
 +					ED_object_base_select(base, select ? BA_SELECT : BA_DESELECT);
  					changed = true;
  				}
  			}



More information about the Bf-blender-cvs mailing list