Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_explode.c
| Show First 20 Lines • Show All 1,020 Lines • ▼ Show 20 Lines | static ParticleSystemModifierData *findPrecedingParticlesystem(Object *ob, ModifierData *emd) | ||||
| } | } | ||||
| return psmd; | return psmd; | ||||
| } | } | ||||
| static Mesh *applyModifier( | static Mesh *applyModifier( | ||||
| ModifierData *md, const ModifierEvalContext *ctx, | ModifierData *md, const ModifierEvalContext *ctx, | ||||
| Mesh *mesh) | Mesh *mesh) | ||||
| { | { | ||||
| ExplodeModifierData *emd = (ExplodeModifierData *) md; | ExplodeModifierData *emd = (ExplodeModifierData *) md; | ||||
| ParticleSystemModifierData *psmd = findPrecedingParticlesystem(ctx->object, md); | |||||
| Object *ob_eval = DEG_get_evaluated_object(ctx->depsgraph, ctx->object); | |||||
JacquesLucke: This assumes that the same object is returned when it is an evaluated object already. Not sure… | |||||
| ParticleSystemModifierData *psmd = findPrecedingParticlesystem(ob_eval, md); | |||||
| if (psmd) { | if (psmd) { | ||||
| ParticleSystem *psys = psmd->psys; | ParticleSystem *psys = psmd->psys; | ||||
| if (psys == NULL || psys->totpart == 0) { | if (psys == NULL || psys->totpart == 0) { | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| if (psys->part == NULL || psys->particles == NULL) { | if (psys->part == NULL || psys->particles == NULL) { | ||||
| ▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines | |||||
This assumes that the same object is returned when it is an evaluated object already. Not sure if this can be assumed.