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:
authormano-wii <germano.costa@ig.com.br>2019-07-08 19:40:06 +0300
committermano-wii <germano.costa@ig.com.br>2019-07-08 19:40:06 +0300
commit45761e4c7cbbed2141afc97fb20b2bf26ce19ac2 (patch)
treef07c983c454b9f72a17a15861d2768b1452c0aaf /source
parentc1bcde0c0feaf8bcfbd3664a52c50611806538ac (diff)
Revert "Fix T63447 Particle system: No particles after switching from hair to ..."
Problems with clang style This reverts commit 8d6a5fb5d3c45cdfb0d06dd7f1f18aa8c870f8c1.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/modes/object_mode.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 9fc11e4f36f..3fec9d59df4 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -3277,12 +3277,7 @@ static void OBJECT_cache_populate_particles(OBJECT_Shaders *sh_data,
ParticleSettings *part = psys->part;
int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as;
- if (part->type == PART_HAIR) {
- /* Hairs should have been rendered by the render engine.*/
- continue;
- }
-
- if (!ELEM(draw_as, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_GR)) {
+ if (draw_as != PART_DRAW_PATH) {
struct GPUBatch *geom = DRW_cache_particles_get_dots(ob, psys);
DRWShadingGroup *shgrp = NULL;
struct GPUBatch *shape = NULL;
@@ -3292,7 +3287,6 @@ static void OBJECT_cache_populate_particles(OBJECT_Shaders *sh_data,
Material *ma = give_current_material(ob, part->omat);
switch (draw_as) {
- default:
case PART_DRAW_DOT:
shgrp = DRW_shgroup_create(sh_data->part_dot, psl->particle);
DRW_shgroup_uniform_vec3(shgrp, "color", ma ? &ma->r : def_prim_col, 1);
@@ -3327,6 +3321,8 @@ static void OBJECT_cache_populate_particles(OBJECT_Shaders *sh_data,
DRW_shgroup_uniform_bool_copy(shgrp, "screen_space", false);
DRW_shgroup_call_instances_with_attribs(shgrp, NULL, shape, geom);
break;
+ default:
+ break;
}
}
}