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

Julian Eisel noreply at git.blender.org
Fri Mar 17 15:42:07 CET 2017


Commit: a96008f3aae2b047ce777418e45eeae09e0ea4e6
Author: Julian Eisel
Date:   Fri Mar 17 15:34:35 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBa96008f3aae2b047ce777418e45eeae09e0ea4e6

Merge branch 'master' into blender2.8

Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c

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



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

diff --cc source/blender/editors/interface/interface_templates.c
index 2f64100fa6,131584dd40..e4d9be3329
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@@ -439,12 -426,11 +439,12 @@@ static void template_ID
  
  		if ((idfrom && idfrom->lib) || !editable)
  			UI_but_flag_enable(but, UI_BUT_DISABLED);
 -		
 -		uiLayoutRow(layout, true);
 +		if (use_big_size) {
 +			uiLayoutRow(layout, true);
 +		}
  	}
  	else if (flag & UI_ID_BROWSE) {
- 		but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 1.5, UI_UNIT_Y,
+ 		but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 1.6, UI_UNIT_Y,
  		                     TIP_(template_id_browse_tip(type)));
  		ui_def_but_icon(but, RNA_struct_ui_icon(type), UI_HAS_ICON);
  		/* default dragging of icon for id browse buttons */
diff --cc source/blender/editors/space_outliner/outliner_draw.c
index 6207ed8579,42d9e4356e..ee943db953
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@@ -844,14 -1047,14 +841,16 @@@ static void tselem_draw_icon(uiBlock *b
  	arg.xb = x;	/* for ui buttons */
  	arg.yb = y;
  	arg.alpha = alpha;
 -	
 +
  	/* placement of icons, copied from interface_widgets.c */
  	aspect = (0.8f * UI_UNIT_Y) / ICON_DEFAULT_HEIGHT;
- 	arg.x = x = x + 4.0f * aspect;
- 	arg.y = y = y + 0.1f * UI_UNIT_Y;
+ 	x += 2.0f * aspect;
+ 	y += 2.0f * aspect;
+ 	arg.x = x = x;
+ 	arg.y = y = y;
  
 +#define ICON_DRAW(_icon) UI_icon_draw_alpha(x, y, _icon, alpha)
 +
  	if (tselem->type) {
  		switch (tselem->type) {
  			case TSE_ANIM_DATA:
@@@ -1250,18 -1384,15 +1249,18 @@@ static void outliner_draw_iconrow(bCont
  
  			if (active != OL_DRAWSEL_NONE) {
  				float ufac = UI_UNIT_X / 20.0f;
 +				float color[4] = {1.0f, 1.0f, 1.0f, 0.4f};
  
  				UI_draw_roundbox_corner_set(UI_CNR_ALL);
 -				glColor4ub(255, 255, 255, 100);
 +				color[3] *= alpha_fac;
 +
  				UI_draw_roundbox(
- 				        (float) *offsx - 1.0f * ufac,
+ 				        (float) *offsx + 1.0f * ufac,
  				        (float)ys + 1.0f * ufac,
- 				        (float)*offsx + UI_UNIT_X - 2.0f * ufac,
+ 				        (float)*offsx + UI_UNIT_X - 1.0f * ufac,
  				        (float)ys + UI_UNIT_Y - ufac,
 -				        (float)UI_UNIT_Y / 2.0f - ufac);
 +				        (float)UI_UNIT_Y / 2.0f - ufac,
 +				         color);
  				glEnable(GL_BLEND); /* roundbox disables */
  			}
  			
@@@ -1382,11 -1535,11 +1381,11 @@@ static void outliner_draw_tree_element
  		if (active != OL_DRAWSEL_NONE) {
  			UI_draw_roundbox_corner_set(UI_CNR_ALL);
  			UI_draw_roundbox(
- 			        (float)startx + UI_UNIT_X,
+ 			        (float)startx + UI_UNIT_X + 1.0f * ufac,
  			        (float)*starty + 1.0f * ufac,
- 			        (float)startx + 2.0f * UI_UNIT_X - 2.0f * ufac,
+ 			        (float)startx + 2.0f * UI_UNIT_X - 1.0f * ufac,
  			        (float)*starty + UI_UNIT_Y - 1.0f * ufac,
 -			        UI_UNIT_Y / 2.0f - 1.0f * ufac);
 +			        UI_UNIT_Y / 2.0f - 1.0f * ufac, color);
  			glEnable(GL_BLEND); /* roundbox disables it */
  			
  			te->flag |= TE_ACTIVE; // for lookup in display hierarchies
@@@ -1395,44 -1548,40 +1394,44 @@@
  		/* open/close icon, only when sublevels, except for scene */
  		if (te->subtree.first || (tselem->type == 0 && te->idcode == ID_SCE) || (te->flag & TE_LAZY_CLOSED)) {
  			int icon_x;
 -			icon_x = startx;
 -			
 +			if (tselem->type == 0 && ELEM(te->idcode, ID_OB, ID_SCE))
 +				icon_x = startx;
 +			else
 +				icon_x = startx + 5 * ufac;
 +
  			// icons a bit higher
  			if (TSELEM_OPEN(tselem, soops))
- 				UI_icon_draw_alpha((float)icon_x, (float)*starty + 2 * ufac, ICON_DISCLOSURE_TRI_DOWN,
 -				UI_icon_draw((float)icon_x + 2 * ufac, (float)*starty + 1 * ufac, ICON_DISCLOSURE_TRI_DOWN);
++				UI_icon_draw_alpha((float)icon_x + 2 * ufac, (float)*starty + 1 * ufac, ICON_DISCLOSURE_TRI_DOWN,
 +				                   alpha_fac);
  			else
- 				UI_icon_draw_alpha((float)icon_x, (float)*starty + 2 * ufac, ICON_DISCLOSURE_TRI_RIGHT,
 -				UI_icon_draw((float)icon_x + 2 * ufac, (float)*starty + 1 * ufac, ICON_DISCLOSURE_TRI_RIGHT);
++				UI_icon_draw_alpha((float)icon_x + 2 * ufac, (float)*starty + 1 * ufac, ICON_DISCLOSURE_TRI_RIGHT,
 +				                   alpha_fac);
  		}
  		offsx += UI_UNIT_X;
  		
  		/* datatype icon */
  		
  		if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))) {
 -			
 -			tselem_draw_icon(block, xmax, (float)startx + offsx, (float)*starty, tselem, te, 1.0f);
 -			
 +			tselem_draw_icon(block, xmax, (float)startx + offsx, (float)*starty, tselem, te, alpha_fac);
- 			offsx += UI_UNIT_X;
+ 			offsx += UI_UNIT_X + 2 * ufac;
  		}
  		else
  			offsx += 2 * ufac;
  		
  		if (tselem->type == 0 && ID_IS_LINKED_DATABLOCK(tselem->id)) {
 -			glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
  			if (tselem->id->tag & LIB_TAG_MISSING) {
- 				UI_icon_draw_alpha((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_BROKEN,
 -				UI_icon_draw((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_BROKEN);
++				UI_icon_draw_alpha((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_BROKEN,
 +				                   alpha_fac);
  			}
  			else if (tselem->id->tag & LIB_TAG_INDIRECT) {
- 				UI_icon_draw_alpha((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_INDIRECT,
 -				UI_icon_draw((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_INDIRECT);
++				UI_icon_draw_alpha((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_INDIRECT,
 +				                   alpha_fac);
  			}
  			else {
- 				UI_icon_draw_alpha((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT,
 -				UI_icon_draw((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT);
++				UI_icon_draw_alpha((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT,
 +				                   alpha_fac);
  			}
- 			offsx += UI_UNIT_X;
 -			glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
+ 			offsx += UI_UNIT_X + 2 * ufac;
  		}
  		glDisable(GL_BLEND);




More information about the Bf-blender-cvs mailing list