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:
authorMiika Hamalainen <blender@miikah.org>2011-07-22 22:51:53 +0400
committerMiika Hamalainen <blender@miikah.org>2011-07-22 22:51:53 +0400
commit2a97e5a772d69c0963c7757033e240abef8d56b5 (patch)
treea8737d358a27bbee8b996d31806a87069c094e23 /source/blender/blenloader/intern/writefile.c
parentcbe1613c0123d7705b9bba3806c03fe09151e729 (diff)
parentffc490cbf1d93c7e0a9b97953f6f52e69b9bc8ec (diff)
Merge with trunk r38619
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 124addb9cd3..832d4442455 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -838,6 +838,7 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
{
ParticleSettings *part;
ParticleDupliWeight *dw;
+ GroupObject *go;
int a;
part= idbase->first;
@@ -852,8 +853,16 @@ static void write_particlesettings(WriteData *wd, ListBase *idbase)
writestruct(wd, DATA, "EffectorWeights", 1, part->effector_weights);
dw = part->dupliweights.first;
- for(; dw; dw=dw->next)
+ for(; dw; dw=dw->next) {
+ /* update indices */
+ dw->index = 0;
+ go = part->dup_group->gobject.first;
+ while(go && go->ob != dw->ob) {
+ go=go->next;
+ dw->index++;
+ }
writestruct(wd, DATA, "ParticleDupliWeight", 1, dw);
+ }
if(part->boids && part->phystype == PART_PHYS_BOIDS) {
BoidState *state = part->boids->states.first;