From 2acf0a13546ab0f12774174f18d373e163f0f19a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 19 Aug 2013 09:07:09 +0000 Subject: Always use ob->bb when drawing the curve types It used to be a check for ob->bb ? ob->bb : cu->bb but in fact it doesn't make sense and only makes code more crappy. Making displist for mballs and curves/surfaces/fonts already ensures object has walid bounding box. -- svn merge -r57938:57939 ^/branches/soc-2013-depsgraph_mt --- source/blender/editors/space_view3d/drawobject.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 62e3f8471a3..5dfc0f48676 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -6323,7 +6323,6 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base, glDepthMask(0); if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) { - Curve *cu = ob->data; DerivedMesh *dm = ob->derivedFinal; bool has_faces = false; @@ -6334,7 +6333,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base, has_faces = BKE_displist_has_faces(&ob->disp); } - if (has_faces && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { + if (has_faces && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) { draw_index_wire = false; if (dm) { draw_mesh_object_outline(v3d, ob, dm); @@ -6375,8 +6374,7 @@ static void draw_wire_extra(Scene *scene, RegionView3D *rv3d, Object *ob, unsign glDepthMask(0); /* disable write in zbuffer, selected edge wires show better */ if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) { - Curve *cu = ob->data; - if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { + if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) { if (ob->type == OB_CURVE) draw_index_wire = false; @@ -6807,7 +6805,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short draw_bounding_volume(scene, ob, ob->boundtype); } } - else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { + else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) { empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col); } @@ -6825,7 +6823,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short draw_bounding_volume(scene, ob, ob->boundtype); } } - else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { + else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb)) { empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col); //XXX old animsys if (cu->path) -- cgit v1.2.3