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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-02-05 21:46:10 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-02-05 21:46:10 +0400
commitaa3d88d34d3b3a352073e6449b092b6e23033127 (patch)
tree1caf1ea58c3167cfd59051c1ce0dd98c79be6997 /source/blender/blenloader/intern/writefile.c
parent6a4f2fd552f48db76d19f94b3d4262712b7f3e7b (diff)
Fix T35328: Disk caches of multiple particle systems on a single object overwrite each other
It was intended to work actually using particle cache's stack index but this index might have been calculated incorrect in special case: * With default cube scene, add particle system to the cube * Add disk cache to the particle system * Save file and reload it * Add another particle system and enable disk cache This would lead to two point caches with the same stack index of zero. This happened because point cache indices list wasn't stored in the .blend file so once you've reload your file blender doesn't know anything about number or point caches used. And what was even more confusing is that point cache indices list was trying to be load from the file, but this failed because it wasn't in the file. This commit solves the root of the issue which is ability of producing .blend file with two point caches using the same disk cache. This is done by making it sure that point cache indices list is stored in the .blend file. And also made it so disabling disk cache will tag it to recalculate stack index. Old broken files wouldn't magically start working, but fixing them is rather simple manually by toggling Disk Cache option. Reviewers: lukastoenne, brecht CC: sergof Differential Revision: https://developer.blender.org/D286
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 0b582dacc5c..129e9800ee4 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1542,6 +1542,7 @@ static void write_objects(WriteData *wd, ListBase *idbase)
write_particlesystems(wd, &ob->particlesystem);
write_modifiers(wd, &ob->modifiers);
+ writelist(wd, DATA, "LinkData", &ob->pc_ids);
writelist(wd, DATA, "LodLevel", &ob->lodlevels);
}
ob= ob->id.next;