Reworked the non-blocking reports display in the info header:
* Now it displays the last report from the global list, not just from operators * Rather than disappearing when a new operator is run, it stays until it times out or a new report is added * Fun animated transitions ;) http://mke3.net/blender/devel/2.5/reports_header.mov Now need to investigate report usage with popups. Ideally we can have most reports non-blocking, so they're less intrusive, only popping up for dire errors. Problem is many things in Blender right now are marked as RPT_ERROR when probably RPT_WARNING is more appropriate. Should probably keep RPT_ERROR for things that demand immediate attention.
This commit is contained in:
@@ -2368,9 +2368,21 @@ static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int state, int rou
|
||||
static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
|
||||
{
|
||||
uiWidgetBase wtb;
|
||||
char old_col[3];
|
||||
|
||||
widget_init(&wtb);
|
||||
|
||||
VECCOPY(old_col, wcol->inner);
|
||||
|
||||
/* abuse but->hsv - if it's non-zero, use this colour as the box's background */
|
||||
if ((but->hsv[0] != 0.0) || (but->hsv[1] != 0.0) || (but->hsv[2] != 0.0)) {
|
||||
float rgb[3];
|
||||
hsv_to_rgb(but->hsv[0], but->hsv[1], but->hsv[2], rgb+0, rgb+1, rgb+2);
|
||||
wcol->inner[0] = rgb[0] * 255;
|
||||
wcol->inner[1] = rgb[1] * 255;
|
||||
wcol->inner[2] = rgb[2] * 255;
|
||||
}
|
||||
|
||||
/* half rounded */
|
||||
round_box_edges(&wtb, roundboxalign, rect, 4.0f);
|
||||
|
||||
@@ -2379,6 +2391,8 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state,
|
||||
/* store the box bg as gl clearcolor, to retrieve later when drawing semi-transparent rects
|
||||
* over the top to indicate disabled buttons */
|
||||
glClearColor(wcol->inner[0]/255.0, wcol->inner[1]/255.0, wcol->inner[2]/255.0, 1.0);
|
||||
|
||||
VECCOPY(wcol->inner, old_col);
|
||||
}
|
||||
|
||||
static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
|
||||
|
||||
Reference in New Issue
Block a user