[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26232] trunk/blender/source/blender/ editors/animation: Bugfix #20782: Animating two materials on a mesh--only first material' s keyframes show up in f-curves editor

Joshua Leung aligorith at gmail.com
Mon Jan 25 00:08:41 CET 2010


Revision: 26232
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26232
Author:   aligorith
Date:     2010-01-25 00:08:38 +0100 (Mon, 25 Jan 2010)

Log Message:
-----------
Bugfix #20782: Animating two materials on a mesh--only first material's keyframes show up in f-curves editor

Wrong indices were being used to reference materials, resulting in too few materials showing up. It seems that at some point since coding this in the 2.4 codebase and now, the range has changed from [0, totcol) to [1, totcol].

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

Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c	2010-01-24 19:30:54 UTC (rev 26231)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c	2010-01-24 23:08:38 UTC (rev 26232)
@@ -1185,7 +1185,7 @@
 	int items=0, a=0;
 	
 	/* firstly check that we actuallly have some materials, by gathering all materials in a temp list */
-	for (a=0; a < ob->totcol; a++) {
+	for (a=1; a <= ob->totcol; a++) {
 		Material *ma= give_current_material(ob, a);
 		short ok = 0;
 		

Modified: trunk/blender/source/blender/editors/animation/keyframes_draw.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_draw.c	2010-01-24 19:30:54 UTC (rev 26231)
+++ trunk/blender/source/blender/editors/animation/keyframes_draw.c	2010-01-24 23:08:38 UTC (rev 26232)
@@ -767,7 +767,7 @@
 	if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
 		int a;
 		
-		for (a=0; a < ob->totcol; a++) {
+		for (a=1; a <= ob->totcol; a++) {
 			Material *ma= give_current_material(ob, a);
 			
 			/* there might not be a material */

Modified: trunk/blender/source/blender/editors/animation/keyframes_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_edit.c	2010-01-24 19:30:54 UTC (rev 26231)
+++ trunk/blender/source/blender/editors/animation/keyframes_edit.c	2010-01-24 23:08:38 UTC (rev 26232)
@@ -219,7 +219,7 @@
 	if ((ob->totcol) && !(filterflag & ADS_FILTER_NOMAT)) {
 		int a;
 		
-		for (a=0; a < ob->totcol; a++) {
+		for (a=1; a <= ob->totcol; a++) {
 			Material *ma= give_current_material(ob, a);
 			
 			/* there might not be a material */





More information about the Bf-blender-cvs mailing list