Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-06-22 08:39:35 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-22 08:39:35 +0400
commitaa267976b86f90423204e11a30eec4e0def0f296 (patch)
treee1b09c017eef0191473b9aa1e59fd08ffe705f43 /source/blender/blenloader/intern/readfile.c
parentf1fb09a493b79e6320a651a035203dff98c3b580 (diff)
parent1efffc1f564af0597512699890d7be9f41a6aee2 (diff)
NLA SoC: Merge from 2.5
21043 to 21072 (NOTE TO SELF: Campbell made a commit in 2.5 before this merge finished)
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 74226cabba6..af4f61fccc4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2932,6 +2932,16 @@ static void direct_link_material(FileData *fd, Material *ma)
static void direct_link_pointcache(FileData *fd, PointCache *cache)
{
+ if((cache->flag & PTCACHE_DISK_CACHE)==0) {
+ PTCacheMem *pm;
+
+ link_list(fd, &cache->mem_cache);
+
+ pm = cache->mem_cache.first;
+
+ for(; pm; pm=pm->next)
+ pm->data = newdataadr(fd, pm->data);
+ }
cache->flag &= ~(PTCACHE_SIMULATION_VALID|PTCACHE_BAKE_EDIT_ACTIVE);
cache->simframe= 0;
}
@@ -3196,10 +3206,8 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
direct_link_dverts(fd, lvl->totvert, CustomData_get(&mesh->mr->vdata, 0, CD_MDEFORMVERT));
direct_link_customdata(fd, &mesh->mr->fdata, lvl->totface);
- if(!mesh->mr->edge_flags)
- mesh->mr->edge_flags= MEM_callocN(sizeof(short)*lvl->totedge, "Multires Edge Flags");
- if(!mesh->mr->edge_creases)
- mesh->mr->edge_creases= MEM_callocN(sizeof(char)*lvl->totedge, "Multires Edge Creases");
+ mesh->mr->edge_flags= newdataadr(fd, mesh->mr->edge_flags);
+ mesh->mr->edge_creases= newdataadr(fd, mesh->mr->edge_creases);
mesh->mr->verts = newdataadr(fd, mesh->mr->verts);
@@ -3987,8 +3995,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
direct_link_keyingsets(fd, &sce->keyingsets);
sce->basact= newdataadr(fd, sce->basact);
-
- sce->radio= newdataadr(fd, sce->radio);
sce->toolsettings= newdataadr(fd, sce->toolsettings);
if(sce->toolsettings) {
@@ -9057,6 +9063,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Scene *sce;
Tex *tx;
ParticleSettings *part;
+ Object *ob;
for(screen= main->screen.first; screen; screen= screen->id.next) {
do_versions_windowmanager_2_50(screen);
@@ -9099,7 +9106,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
}
- /* particle settings conversion */
+ /* particle draw and render types */
for(part= main->particle.first; part; part= part->id.next) {
if(part->draw_as) {
if(part->draw_as == PART_DRAW_DOT) {
@@ -9115,6 +9122,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+ /* set old pointcaches to have disk cache flag */
+ for(ob = main->object.first; ob; ob= ob->id.next) {
+ ParticleSystem *psys = ob->particlesystem.first;
+
+ for(; psys; psys=psys->next) {
+ if(psys->pointcache)
+ psys->pointcache->flag |= PTCACHE_DISK_CACHE;
+ }
+
+ /* TODO: softbody & cloth caches */
+ }
}
/* TODO: should be moved into one of the version blocks once this branch moves to trunk and we can