diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-12-28 19:30:58 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-12-28 19:30:58 +0300 |
commit | 6ecab6dd8e48d564a2b43e0e81e79d079e8b4c77 (patch) | |
tree | 618e2d24eb34a05a81f726dd52eb2b7468e9296d /source/blender/editors/space_info | |
parent | 605263177b8eea24c1449e4dbf0138175ec3dddf (diff) |
Revert particle system and point cache removal in blender2.8 branch.
This reverts commit 5aa19be91263a249ffae75573e3b32f24269d890 and b4a721af694817fa921b119df83d33ede7d7fed0.
Due to postponement of particle system rewrite it was decided to put particle code
back into the 2.8 branch for the time being.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r-- | source/blender/editors/space_info/info_stats.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 6e156750815..8dc6c4229b2 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -35,7 +35,6 @@ #include "DNA_group_types.h" #include "DNA_lattice_types.h" #include "DNA_meta_types.h" -#include "DNA_object_types.h" #include "DNA_scene_types.h" #include "BLI_math.h" @@ -51,6 +50,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_key.h" #include "BKE_paint.h" +#include "BKE_particle.h" #include "BKE_editmesh.h" #include "ED_info.h" @@ -273,7 +273,37 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats) { if (base->flag & SELECT) stats->totobjsel++; - if (ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS | OB_DUPLIFACES))) { + if (ob->transflag & OB_DUPLIPARTS) { + /* Dupli Particles */ + ParticleSystem *psys; + ParticleSettings *part; + + for (psys = ob->particlesystem.first; psys; psys = psys->next) { + part = psys->part; + + if (part->draw_as == PART_DRAW_OB && part->dup_ob) { + int tot = count_particles(psys); + stats_object(part->dup_ob, 0, tot, stats); + } + else if (part->draw_as == PART_DRAW_GR && part->dup_group) { + GroupObject *go; + int tot, totgroup = 0, cur = 0; + + for (go = part->dup_group->gobject.first; go; go = go->next) + totgroup++; + + for (go = part->dup_group->gobject.first; go; go = go->next) { + tot = count_particles_mod(psys, totgroup, cur); + stats_object(go->ob, 0, tot, stats); + cur++; + } + } + } + + stats_object(ob, base->flag & SELECT, 1, stats); + stats->totobj++; + } + else if (ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS | OB_DUPLIFACES))) { /* Dupli Verts/Faces */ int tot; |