[Bf-blender-cvs] [0e78e3038d0] master: Separation lines for Quad View

Harley Acheson noreply at git.blender.org
Thu Apr 4 01:27:48 CEST 2019


Commit: 0e78e3038d024a112e2caccc0539a62c44bb18ef
Author: Harley Acheson
Date:   Thu Apr 4 01:25:43 2019 +0200
Branches: master
https://developer.blender.org/rB0e78e3038d024a112e2caccc0539a62c44bb18ef

Separation lines for Quad View

Reviewers: brecht, billreynish, fclem

Reviewed By: billreynish, fclem

Differential Revision: https://developer.blender.org/D4633

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

M	source/blender/editors/screen/area.c

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

diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index e599f3b7ed3..886f2781312 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -535,12 +535,23 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
 	if (sa) {
 		const bScreen *screen = WM_window_get_active_screen(win);
 
-		/* Only draw region emboss for top-bar and quad-view. */
+		/* Only region emboss for top-bar */
 		if ((screen->state != SCREENFULL) && ED_area_is_global(sa)) {
 			region_draw_emboss(ar, &ar->winrct, (REGION_EMBOSS_LEFT | REGION_EMBOSS_RIGHT));
 		}
 		else if ((ar->regiontype == RGN_TYPE_WINDOW) && (ar->alignment == RGN_ALIGN_QSPLIT)) {
-			region_draw_emboss(ar, &ar->winrct, REGION_EMBOSS_ALL);
+
+			/* draw separating lines between the quad views */
+
+			float color[4] = { 0.0f, 0.0f, 0.0f, 0.8f };
+			UI_GetThemeColor3fv(TH_EDITOR_OUTLINE, color);
+			GPUVertFormat *format = immVertexFormat();
+			uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
+			immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
+			immUniformColor4fv(color);
+			GPU_line_width(1.0f);
+			imm_draw_box_wire_2d(pos, 0, 0, ar->winrct.xmax - ar->winrct.xmin + 1, ar->winrct.ymax - ar->winrct.ymin + 1);
+			immUnbindProgram();
 		}
 	}



More information about the Bf-blender-cvs mailing list