[Bf-blender-cvs] [1e58af0] master: Fix T47454: Line width display error

Campbell Barton noreply at git.blender.org
Fri Feb 19 05:13:37 CET 2016


Commit: 1e58af0f53318da8787ca8d9590336eb0b8d41cc
Author: Campbell Barton
Date:   Fri Feb 19 12:45:01 2016 +1100
Branches: master
https://developer.blender.org/rB1e58af0f53318da8787ca8d9590336eb0b8d41cc

Fix T47454: Line width display error

Note, there are still cases where nurbs surfaces display double line width,
but this isn't a regression from previous releases.

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

M	source/blender/editors/space_view3d/drawobject.c

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

diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index c5d6e7c..cfafd3e 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7125,7 +7125,6 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 	RegionView3D *rv3d = ar->regiondata;
 	Object *ob = base->object;
 	
-	glLineWidth(UI_GetThemeValuef(TH_OUTLINE_WIDTH) * 2.0f);
 	glDepthMask(0);
 	
 	if (ELEM(ob->type, OB_FONT, OB_CURVE, OB_SURF)) {
@@ -7148,6 +7147,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 		}
 
 		if (has_faces && ED_view3d_boundbox_clip(rv3d, ob->bb)) {
+			glLineWidth(UI_GetThemeValuef(TH_OUTLINE_WIDTH) * 2.0f);
 			if (dm) {
 				draw_mesh_object_outline(v3d, ob, dm);
 			}
@@ -7159,13 +7159,16 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
 	else if (ob->type == OB_MBALL) {
 		if (BKE_mball_is_basis(ob)) {
 			if ((base->flag & OB_FROMDUPLI) == 0) {
+				glLineWidth(UI_GetThemeValuef(TH_OUTLINE_WIDTH) * 2.0f);
 				drawDispListwire(&ob->curve_cache->disp, ob->type);
 			}
 		}
 	}
 	else if (ob->type == OB_ARMATURE) {
-		if (!(ob->mode & OB_MODE_POSE && base == scene->basact))
+		if (!(ob->mode & OB_MODE_POSE && base == scene->basact)) {
+			glLineWidth(UI_GetThemeValuef(TH_OUTLINE_WIDTH) * 2.0f);
 			draw_armature(scene, v3d, ar, base, OB_WIRE, 0, ob_wire_col, true);
+		}
 	}
 
 	glDepthMask(1);




More information about the Bf-blender-cvs mailing list