forked from bartvdbraak/blender
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
This commit is contained in:
parent
beffaa293e
commit
2acf0a1354
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user