[Bf-blender-cvs] [3482b33] gooseberry: Wire-color was accidentally broken in a merge
Campbell Barton
noreply at git.blender.org
Thu Jan 29 04:18:12 CET 2015
Commit: 3482b33f9ba1693575f103bc6bf86ea6110979f8
Author: Campbell Barton
Date: Thu Jan 29 14:15:21 2015 +1100
Branches: gooseberry
https://developer.blender.org/rB3482b33f9ba1693575f103bc6bf86ea6110979f8
Wire-color was accidentally broken in a merge
Adding back changes to background needed for auto-contrast.
===================================================================
M source/blender/editors/space_view3d/view3d_draw.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index a461c8e..1cead62 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2836,6 +2836,8 @@ void ED_view3d_draw_offscreen_init(Scene *scene, View3D *v3d)
*/
static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar, bool force)
{
+ const bool is_wire_color = V3D_IS_WIRECOLOR(scene, v3d);
+
/* clear background */
if (scene->world && ((v3d->flag3 & V3D_SHOW_WORLD) || force)) {
float alpha = (force) ? 1.0f : 0.0;
@@ -2980,6 +2982,12 @@ static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar, bool
#undef VIEWGRAD_RES_X
#undef VIEWGRAD_RES_Y
+
+ if (is_wire_color) {
+ float col_mid[3];
+ mid_v3_v3v3(col_mid, col_hor, col_zen);
+ draw_object_bg_wire_color_set(col_mid);
+ }
}
else { /* solid sky */
float col_hor[3];
@@ -2988,10 +2996,18 @@ static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar, bool
glClearColor(col_hor[0], col_hor[1], col_hor[2], alpha);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ if (is_wire_color) {
+ draw_object_bg_wire_color_set(col_hor);
+ }
}
}
else {
if (UI_GetThemeValue(TH_SHOW_BACK_GRAD)) {
+ float col_low[3], col_high[3];
+
+ UI_GetThemeColor3fv(TH_HIGH_GRAD, col_high);
+ UI_GetThemeColor3fv(TH_LOW_GRAD, col_low);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
@@ -3003,10 +3019,10 @@ static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar, bool
glDepthFunc(GL_ALWAYS);
glShadeModel(GL_SMOOTH);
glBegin(GL_QUADS);
- UI_ThemeColor(TH_LOW_GRAD);
+ glColor3fv(col_low);
glVertex3f(-1.0, -1.0, 1.0);
glVertex3f(1.0, -1.0, 1.0);
- UI_ThemeColor(TH_HIGH_GRAD);
+ glColor3fv(col_high);
glVertex3f(1.0, 1.0, 1.0);
glVertex3f(-1.0, 1.0, 1.0);
glEnd();
@@ -3020,10 +3036,23 @@ static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar, bool
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
+
+ if (is_wire_color) {
+ float col_mid[3];
+ mid_v3_v3v3(col_mid, col_low, col_high);
+ draw_object_bg_wire_color_set(col_mid);
+ }
}
else {
+ float col[3];
+
+ UI_GetThemeColor3fv(TH_HIGH_GRAD, col);
UI_ThemeClearColor(TH_HIGH_GRAD);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ if (is_wire_color) {
+ draw_object_bg_wire_color_set(col);
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list