Revision: 37073
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37073
Author:   blendix
Date:     2011-06-01 13:10:37 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Fix #27541: f-curve generator modifier file read missed endian switch,
found by Guillaume Roguez.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2011-06-01 
11:55:28 UTC (rev 37072)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2011-06-01 
13:10:37 UTC (rev 37073)
@@ -1723,6 +1723,7 @@
 static void direct_link_fmodifiers(FileData *fd, ListBase *list)
 {
        FModifier *fcm;
+       int a;
        
        for (fcm= list->first; fcm; fcm= fcm->next) {
                /* relink general data */
@@ -1736,6 +1737,11 @@
                                FMod_Generator *data= (FMod_Generator 
*)fcm->data;
                                
                                data->coefficients= newdataadr(fd, 
data->coefficients);
+
+                               if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
+                                       for(a = 0; a < data->arraysize; a++)
+                                               
SWITCH_INT(data->coefficients[a]);
+                               }
                        }
                                break;
                        case FMODIFIER_TYPE_ENVELOPE:

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to