Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_explode.c
| Show First 20 Lines • Show All 1,117 Lines • ▼ Show 20 Lines | static ParticleSystemModifierData *findPrecedingParticlesystem(Object *ob, ModifierData *emd) | ||||
| for (md = ob->modifiers.first; emd != md; md = md->next) { | for (md = ob->modifiers.first; emd != md; md = md->next) { | ||||
| if (md->type == eModifierType_ParticleSystem) { | if (md->type == eModifierType_ParticleSystem) { | ||||
| psmd = (ParticleSystemModifierData *)md; | psmd = (ParticleSystemModifierData *)md; | ||||
| } | } | ||||
| } | } | ||||
| return psmd; | return psmd; | ||||
| } | } | ||||
| static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | ||||
| { | { | ||||
| ExplodeModifierData *emd = (ExplodeModifierData *)md; | ExplodeModifierData *emd = (ExplodeModifierData *)md; | ||||
| ParticleSystemModifierData *psmd = findPrecedingParticlesystem(ctx->object, md); | ParticleSystemModifierData *psmd = findPrecedingParticlesystem(ctx->object, 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) { | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | ModifierTypeInfo modifierType_Explode = { | ||||
| /* type */ eModifierTypeType_Constructive, | /* type */ eModifierTypeType_Constructive, | ||||
| /* flags */ eModifierTypeFlag_AcceptsMesh, | /* flags */ eModifierTypeFlag_AcceptsMesh, | ||||
| /* copyData */ copyData, | /* copyData */ copyData, | ||||
| /* deformVerts */ NULL, | /* deformVerts */ NULL, | ||||
| /* deformMatrices */ NULL, | /* deformMatrices */ NULL, | ||||
| /* deformVertsEM */ NULL, | /* deformVertsEM */ NULL, | ||||
| /* deformMatricesEM */ NULL, | /* deformMatricesEM */ NULL, | ||||
| /* applyModifier */ applyModifier, | /* modifyMesh */ modifyMesh, | ||||
| /* modifyHair */ NULL, | |||||
| /* modifyPointCloud */ NULL, | |||||
| /* modifyVolume */ NULL, | |||||
| /* initData */ initData, | /* initData */ initData, | ||||
| /* requiredDataMask */ requiredDataMask, | /* requiredDataMask */ requiredDataMask, | ||||
| /* freeData */ freeData, | /* freeData */ freeData, | ||||
| /* isDisabled */ NULL, | /* isDisabled */ NULL, | ||||
| /* updateDepsgraph */ NULL, | /* updateDepsgraph */ NULL, | ||||
| /* dependsOnTime */ dependsOnTime, | /* dependsOnTime */ dependsOnTime, | ||||
| /* dependsOnNormals */ NULL, | /* dependsOnNormals */ NULL, | ||||
| /* foreachObjectLink */ NULL, | /* foreachObjectLink */ NULL, | ||||
| /* foreachIDLink */ NULL, | /* foreachIDLink */ NULL, | ||||
| /* foreachTexLink */ NULL, | /* foreachTexLink */ NULL, | ||||
| /* freeRuntimeData */ NULL, | /* freeRuntimeData */ NULL, | ||||
| }; | }; | ||||