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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-11-29 18:23:27 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-11-29 18:25:23 +0300
commit1c0bc19e3f55eff4bc2df4c2affb64272c5f5cb7 (patch)
tree2015f4b1fb17fbbfb55c324500f877d806a21767 /source
parent51c85a23cafdf90aa88d57faea60f6a8103d1c7a (diff)
Fix T57796: bad 'draw emitter' conversion, importing shared particle systems from 2.79b to 2.80
Not sure what those #ifdef's were supposed to do exactly... But one thing is for sure, clearing that flag in particlesettings after first encounter would prevent transferring it properly to other objects that would use same particlesettings.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 5d1d4a9ad2f..906dc96be01 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -723,24 +723,12 @@ void do_versions_after_linking_280(Main *bmain)
if (!MAIN_VERSION_ATLEAST(bmain, 280, 4)) {
for (Object *object = bmain->object.first; object; object = object->id.next) {
-#ifndef VERSION_280_SUBVERSION_4
- /* If any object already has an initialized value for
- * duplicator_visibility_flag it means we've already doversioned it.
- * TODO(all) remove the VERSION_280_SUBVERSION_4 code once the subversion was bumped. */
- if (object->duplicator_visibility_flag != 0) {
- break;
- }
-#endif
if (object->particlesystem.first) {
object->duplicator_visibility_flag = OB_DUPLI_FLAG_VIEWPORT;
for (ParticleSystem *psys = object->particlesystem.first; psys; psys = psys->next) {
if (psys->part->draw & PART_DRAW_EMITTER) {
object->duplicator_visibility_flag |= OB_DUPLI_FLAG_RENDER;
-#ifndef VERSION_280_SUBVERSION_4
- psys->part->draw &= ~PART_DRAW_EMITTER;
-#else
break;
-#endif
}
}
}
@@ -751,6 +739,11 @@ void do_versions_after_linking_280(Main *bmain)
object->duplicator_visibility_flag = OB_DUPLI_FLAG_VIEWPORT | OB_DUPLI_FLAG_RENDER;
}
}
+
+ /* Cleanup deprecated flag from particlesettings data-blocks. */
+ for (ParticleSettings *part = bmain->particle.first; part; part = part->id.next) {
+ part->draw &= ~PART_DRAW_EMITTER;
+ }
}
/* SpaceTime & SpaceLogic removal/replacing */