[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56176] trunk/blender/source/blender/ editors/space_view3d/drawobject.c: code cleanup: remove unused var from drawobject 'warning_recursive'.

Campbell Barton ideasman42 at gmail.com
Sat Apr 20 07:50:29 CEST 2013


Revision: 56176
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56176
Author:   campbellbarton
Date:     2013-04-20 05:50:22 +0000 (Sat, 20 Apr 2013)
Log Message:
-----------
code cleanup: remove unused var from drawobject  'warning_recursive'. also remove unused colors from 'colortab'.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2013-04-19 17:23:08 UTC (rev 56175)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2013-04-20 05:50:22 UTC (rev 56176)
@@ -256,12 +256,8 @@
 }
 
 /***/
-static unsigned int colortab[24] = {
-	0x0,      0xFF88FF, 0xFFBBFF,
-	0x403000, 0xFFFF88, 0xFFFFBB,
-	0x104040, 0x66CCCC, 0x77CCCC,
-	0x104010, 0x55BB55, 0x66FF66,
-	0xFFFFFF
+static const unsigned int colortab[] = {
+	0x0, 0x403000, 0xFFFF88
 };
 
 
@@ -6304,8 +6300,7 @@
 	setlinestyle(0);
 }
 
-static void draw_object_wire_color(Scene *scene, Base *base, unsigned char r_ob_wire_col[4],
-                                   const int warning_recursive)
+static void draw_object_wire_color(Scene *scene, Base *base, unsigned char r_ob_wire_col[4])
 {
 	Object *ob = base->object;
 	int colindex = 0;
@@ -6326,16 +6321,8 @@
 	else {
 		/* Sets the 'colindex' */
 		if (ob->id.lib) {
-			colindex = (base->flag & (SELECT + BA_WAS_SEL)) ? 4 : 3;
+			colindex = (base->flag & (SELECT + BA_WAS_SEL)) ? 2 : 1;
 		}
-		else if (warning_recursive == 1) {
-			if (base->flag & (SELECT + BA_WAS_SEL)) {
-				colindex = (scene->basact == base) ? 8 : 7;
-			}
-			else {
-				colindex = 6;
-			}
-		}
 		/* Sets the 'theme_id' or fallback to wire */
 		else {
 			if (ob->flag & OB_FROMGROUP) {
@@ -6413,7 +6400,6 @@
  */
 void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short dflag)
 {
-	static int warning_recursive = 0;
 	ModifierData *md = NULL;
 	Object *ob = base->object;
 	Curve *cu;
@@ -6492,7 +6478,7 @@
 
 		ED_view3d_project_base(ar, base);
 
-		draw_object_wire_color(scene, base, _ob_wire_col, warning_recursive);
+		draw_object_wire_color(scene, base, _ob_wire_col);
 		ob_wire_col = _ob_wire_col;
 
 		glColor3ubv(ob_wire_col);
@@ -6776,10 +6762,8 @@
 	}
 
 	/* code for new particle system */
-	if ((warning_recursive == 0) &&
-	    (ob->particlesystem.first) &&
-	    (ob != scene->obedit)
-	    )
+	if ((ob->particlesystem.first) &&
+	    (ob != scene->obedit))
 	{
 		ParticleSystem *psys;
 
@@ -6810,8 +6794,7 @@
 	}
 
 	/* draw edit particles last so that they can draw over child particles */
-	if ((warning_recursive == 0) &&
-	    (dflag & DRAW_PICKING) == 0 &&
+	if ((dflag & DRAW_PICKING) == 0 &&
 	    (!scene->obedit))
 	{
 
@@ -7017,8 +7000,7 @@
 		glDisable(GL_DEPTH_TEST);
 	}
 
-	if ((warning_recursive) ||
-	    (base->flag & OB_FROMDUPLI) ||
+	if ((base->flag & OB_FROMDUPLI) ||
 	    (v3d->flag2 & V3D_RENDER_OVERRIDE))
 	{
 		return;




More information about the Bf-blender-cvs mailing list