Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 13:07:09 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 13:07:09 +0400
commit2acf0a13546ab0f12774174f18d373e163f0f19a (patch)
treedeca73a3eee836da0ce75524fa1902cfb9963d80
parentbeffaa293ee2b111f256b989bd038460bde1eea0 (diff)
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
-rw-r--r--source/blender/editors/space_view3d/drawobject.c10
1 files changed, 4 insertions, 6 deletions
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)