Clay: Cleanup, reduce indentation level
This commit is contained in:
@@ -829,25 +829,25 @@ static void clay_cache_populate_particles(void *vedata, Object *ob)
|
|||||||
CLAY_StorageList *stl = ((CLAY_Data *)vedata)->stl;
|
CLAY_StorageList *stl = ((CLAY_Data *)vedata)->stl;
|
||||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||||
|
|
||||||
if (ob != draw_ctx->object_edit) {
|
if (ob == draw_ctx->object_edit) {
|
||||||
for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) {
|
return;
|
||||||
if (psys_check_enabled(ob, psys, false)) {
|
}
|
||||||
ParticleSettings *part = psys->part;
|
|
||||||
int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as;
|
|
||||||
|
|
||||||
if (draw_as == PART_DRAW_PATH && !psys->pathcache && !psys->childcache) {
|
for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) {
|
||||||
draw_as = PART_DRAW_DOT;
|
if (!psys_check_enabled(ob, psys, false)) {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
ParticleSettings *part = psys->part;
|
||||||
|
int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as;
|
||||||
|
|
||||||
static float mat[4][4];
|
if (draw_as == PART_DRAW_PATH && !psys->pathcache && !psys->childcache) {
|
||||||
unit_m4(mat);
|
draw_as = PART_DRAW_DOT;
|
||||||
|
}
|
||||||
|
|
||||||
if (draw_as == PART_DRAW_PATH) {
|
if (draw_as == PART_DRAW_PATH) {
|
||||||
struct Gwn_Batch *geom = DRW_cache_particles_get_hair(psys, NULL);
|
struct Gwn_Batch *geom = DRW_cache_particles_get_hair(psys, NULL);
|
||||||
DRWShadingGroup *hair_shgrp = CLAY_hair_shgrp_get(vedata, ob, stl, psl);
|
DRWShadingGroup *hair_shgrp = CLAY_hair_shgrp_get(vedata, ob, stl, psl);
|
||||||
DRW_shgroup_call_add(hair_shgrp, geom, mat);
|
DRW_shgroup_call_add(hair_shgrp, geom, NULL);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user