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:
authorJacques Lucke <mail@jlucke.com>2019-03-18 19:53:03 +0300
committerJacques Lucke <mail@jlucke.com>2019-03-18 19:53:14 +0300
commitb29790a953ff0f31c431daaaa2864e48bd38e94c (patch)
treedf38f416664c7694e0646e3b954d6a32b8f244f1 /source/blender/blenloader
parent8e54ef69c66ff2458a508e5119a52fb17ad81515 (diff)
Fix T62587: Particle instances Use Count not saved correctly
Reviewers: brecht Differential Revision: https://developer.blender.org/D4544
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/writefile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c2cd6f282e8..ebc46d7573b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1422,9 +1422,10 @@ static void write_particlesettings(WriteData *wd, ParticleSettings *part)
if (part->instance_collection) { /* can be NULL if lining fails or set to None */
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(part->instance_collection, object)
{
- if (object != dw->ob) {
- dw->index++;
+ if (object == dw->ob) {
+ break;
}
+ dw->index++;
}
FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
}