From 466cd2535b1b11f266ffd929c6134647d6d21450 Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Wed, 18 Nov 2020 09:53:05 -0500 Subject: [PATCH 1/2] Fix exact boolean coplanar problem due to inexact transform. This is an addendum to previous boolean fix, where the object transformation was "cleaned". Now the operand one is too. This fixes the issue shown in the video in T82301 when you move a column around the XY plane with the top and bottom faces supposedly coplanar with a cube. The transformation matrix when you do that has a tiny offset in the z component. --- source/blender/modifiers/intern/MOD_boolean.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 8d0c7cd6d49..7ddaf15aaa3 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -340,13 +340,16 @@ static void BMD_mesh_intersection(BMesh *bm, * other than 0, -1, or 1 in the scaling part of the matrix. */ float cleaned_object_obmat[4][4]; + float cleaned_operand_obmat[4][4]; clean_obmat(cleaned_object_obmat, object->obmat); invert_m4_m4(imat, cleaned_object_obmat); + clean_obmat(cleaned_operand_obmat, operand_ob->obmat); + mul_m4_m4m4(omat, imat, cleaned_operand_obmat); } else { invert_m4_m4(imat, object->obmat); + mul_m4_m4m4(omat, imat, operand_ob->obmat); } - mul_m4_m4m4(omat, imat, operand_ob->obmat); BMVert *eve; i = 0; From 9a8f5022b70f3b33968b61b54f2b2c785b2f5145 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Tue, 17 Nov 2020 20:04:42 -0700 Subject: [PATCH 2/2] Fix: Outliner hierarchy line width variations During some operators like rotate in grease pencil edit mode the hierarchy lines in the outliner would draw twice as thick. Set the width before drawing the lines in the outliner. Differential Revision: https://developer.blender.org/D9589 --- source/blender/editors/space_outliner/outliner_draw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 7242d7e0002..ea2e3ce2565 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -3278,6 +3278,7 @@ static void outliner_draw_hierarchy_lines(SpaceOutliner *space_outliner, UI_GetThemeColorBlend3ubv(TH_BACK, TH_TEXT, 0.4f, col); col[3] = 255; + GPU_line_width(1.0f); GPU_blend(GPU_BLEND_ALPHA); outliner_draw_hierarchy_lines_recursive(pos, space_outliner, lb, startx, col, false, starty); GPU_blend(GPU_BLEND_NONE);