[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32901] trunk/blender/source/blender/ editors/animation/anim_filter.c: Fix for [#24476] The driver is not displayed in GraphEditor.

Janne Karhu jhkarh at gmail.com
Sat Nov 6 23:23:37 CET 2010


Revision: 32901
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32901
Author:   jhk
Date:     2010-11-06 23:23:37 +0100 (Sat, 06 Nov 2010)

Log Message:
-----------
Fix for [#24476] The driver is not displayed in GraphEditor.
* TSK! give_current_material(..) is used with index+1
* Also very bad practice to use same loop variable name in a loop inside a loop.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_filter.c

Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c	2010-11-06 22:03:42 UTC (rev 32900)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c	2010-11-06 22:23:37 UTC (rev 32901)
@@ -1394,9 +1394,9 @@
 			/* need to check textures */
 			if(ma->mtex) {
 				MTex **mtex = ma->mtex;
-				int a;
-				for (a=0; a < MAX_MTEX; a++) {
-					if (ELEM3(NULL, mtex[a], mtex[a]->tex, mtex[a]->tex->adt))
+				int mtInd;
+				for (mtInd=0; mtInd < MAX_MTEX; mtInd++) {
+					if (ELEM3(NULL, mtex[mtInd], mtex[mtInd]->tex, mtex[mtInd]->tex->adt))
 						continue;
 					else
 						ok=1;
@@ -2206,7 +2206,7 @@
 					int a;
 					
 					/* firstly check that we actuallly have some materials */
-					for (a=0; a < ob->totcol; a++) {
+					for (a=1; a <= ob->totcol; a++) {
 						Material *ma= give_current_material(ob, a);
 						
 						if (ma) {
@@ -2411,7 +2411,7 @@
 					int a;
 					
 					/* firstly check that we actuallly have some materials */
-					for (a=0; a < ob->totcol; a++) {
+					for (a=1; a <= ob->totcol; a++) {
 						Material *ma= give_current_material(ob, a);
 						int mtInd;
 						





More information about the Bf-blender-cvs mailing list