[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57939] branches/soc-2013-depsgraph_mt/ source/blender/editors/space_view3d/drawobject.c: Always use ob-> bb when drawing the curve types

Sergey Sharybin sergey.vfx at gmail.com
Tue Jul 2 21:22:55 CEST 2013


Revision: 57939
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57939
Author:   nazgul
Date:     2013-07-02 19:22:55 +0000 (Tue, 02 Jul 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawobject.c

Modified: branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawobject.c	2013-07-02 19:22:52 UTC (rev 57938)
+++ branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawobject.c	2013-07-02 19:22:55 UTC (rev 57939)
@@ -6235,7 +6235,6 @@
 	glDepthMask(0);
 	
 	if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) {
-		Curve *cu = ob->data;
 		DerivedMesh *dm = ob->derivedFinal;
 		bool has_faces = false;
 
@@ -6246,7 +6245,7 @@
 			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);
@@ -6287,8 +6286,7 @@
 		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;
 
@@ -6719,7 +6717,7 @@
 					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);
 			}
 
@@ -6737,7 +6735,7 @@
 					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)




More information about the Bf-blender-cvs mailing list