Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_particle.c
| Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (ParticleSystem *, psys, &ob->particlesystem) { | ||||
| if (!ELEM(draw_as, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_GR)) { | if (!ELEM(draw_as, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_GR)) { | ||||
| struct GPUBatch *geom = DRW_cache_particles_get_dots(ob, psys); | struct GPUBatch *geom = DRW_cache_particles_get_dots(ob, psys); | ||||
| struct GPUBatch *shape = NULL; | struct GPUBatch *shape = NULL; | ||||
| DRWShadingGroup *grp; | DRWShadingGroup *grp; | ||||
| /* TODO(fclem): Here would be a good place for preemptive culling. */ | /* TODO(fclem): Here would be a good place for preemptive culling. */ | ||||
| /* NOTE(fclem): Is color even useful in our modern context? */ | /* NOTE(fclem): Is color even useful in our modern context? */ | ||||
| Material *ma = BKE_object_material_get(ob, part->omat); | Material *ma = BKE_object_material_get_eval(ob, part->omat); | ||||
| float color[4] = {0.6f, 0.6f, 0.6f, part->draw_size}; | float color[4] = {0.6f, 0.6f, 0.6f, part->draw_size}; | ||||
| if (ma != NULL) { | if (ma != NULL) { | ||||
| copy_v3_v3(color, &ma->r); | copy_v3_v3(color, &ma->r); | ||||
| } | } | ||||
| switch (draw_as) { | switch (draw_as) { | ||||
| default: | default: | ||||
| case PART_DRAW_DOT: | case PART_DRAW_DOT: | ||||
| Show All 25 Lines | |||||