Revision: 18331
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18331
Author:   nicholasbishop
Date:     2009-01-05 04:26:04 +0100 (Mon, 05 Jan 2009)

Log Message:
-----------
Fixed file loading for multires (broken during merge), also corrected 
linker flags so I can link with the gold linker.

Modified Paths:
--------------
    branches/soc-2008-nicholasbishop/CMakeLists.txt
    branches/soc-2008-nicholasbishop/source/blender/blenloader/intern/readfile.c

Modified: branches/soc-2008-nicholasbishop/CMakeLists.txt
===================================================================
--- branches/soc-2008-nicholasbishop/CMakeLists.txt     2009-01-05 01:58:58 UTC 
(rev 18330)
+++ branches/soc-2008-nicholasbishop/CMakeLists.txt     2009-01-05 03:26:04 UTC 
(rev 18331)
@@ -184,7 +184,7 @@
 
   SET(ZLIB_LIB z)
 
-  SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++")
+  SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11 -ldl")
 
   IF(WITH_OPENMP)
     SET(LLIBS "${LLIBS} -lgomp")

Modified: 
branches/soc-2008-nicholasbishop/source/blender/blenloader/intern/readfile.c
===================================================================
--- 
branches/soc-2008-nicholasbishop/source/blender/blenloader/intern/readfile.c    
    2009-01-05 01:58:58 UTC (rev 18330)
+++ 
branches/soc-2008-nicholasbishop/source/blender/blenloader/intern/readfile.c    
    2009-01-05 03:26:04 UTC (rev 18331)
@@ -2786,6 +2786,19 @@
        }
 }
 
+static void direct_link_mdisps(FileData *fd, int count, MDisps *mdisps)
+{
+       if(mdisps) {
+               int i;
+
+               for(i = 0; i < count; ++i) {
+                       mdisps[i].disps = newdataadr(fd, mdisps[i].disps);
+                       if(!mdisps[i].disps)
+                               mdisps[i].totdisp = 0;
+               }
+       }       
+}
+
 static void direct_link_customdata(FileData *fd, CustomData *data, int count)
 {
        int i = 0;
@@ -2797,6 +2810,8 @@
 
                if (CustomData_verify_versions(data, i)) {
                        layer->data = newdataadr(fd, layer->data);
+                       if(layer->type == CD_MDISPS)
+                               direct_link_mdisps(fd, count, layer->data);
                        i++;
                }
        }
@@ -3244,6 +3259,12 @@
                                                SWITCH_INT(mmd->dynverts[a])
                        }
                }
+               else if (md->type==eModifierType_Multires) {
+                       MultiresModifierData *mmd = (MultiresModifierData*) md;
+                       
+                       mmd->undo_verts = newdataadr(fd, mmd->undo_verts);
+                       mmd->undo_signal = !!mmd->undo_verts;
+               }
        }
 }
 


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

Reply via email to