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 */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to