diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-01-05 06:26:04 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-01-05 06:26:04 +0300 |
commit | ca87ea315dcd1df8d120d12d34dd3b84de8f9cd9 (patch) | |
tree | 476ca2d88ea068fcb93bbc807097f1967e15ca32 | |
parent | 07e4d1e55bb3c973d560b3b1b5dd50211578dfd0 (diff) |
Fixed file loading for multires (broken during merge), also corrected soc-2008-nicholasbishop
linker flags so I can link with the gold linker.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b96ca585a6..f1ac3b2a828 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,7 +184,7 @@ IF(UNIX) 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") diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 989f80dbc1d..23dc226df5c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2786,6 +2786,19 @@ static void direct_link_dverts(FileData *fd, int count, MDeformVert *mdverts) } } +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 @@ static void direct_link_customdata(FileData *fd, CustomData *data, int count) 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 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) 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; + } } } |