Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/particle.c
| Show First 20 Lines • Show All 3,558 Lines • ▼ Show 20 Lines | void object_remove_particle_system(Scene *UNUSED(scene), Object *ob) | ||||
| if ((md = modifiers_findByType(ob, eModifierType_DynamicPaint))) { | if ((md = modifiers_findByType(ob, eModifierType_DynamicPaint))) { | ||||
| DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; | DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; | ||||
| if (pmd->brush && pmd->brush->psys) | if (pmd->brush && pmd->brush->psys) | ||||
| if (pmd->brush->psys == psys) | if (pmd->brush->psys == psys) | ||||
| pmd->brush->psys = NULL; | pmd->brush->psys = NULL; | ||||
| } | } | ||||
| if ((md = modifiers_findByType(ob, eModifierType_ParticleMesher))) { | |||||
| ParticleMesherModifierData *pmmd = (ParticleMesherModifierData *)md; | |||||
| if (pmmd->psys == psys) | |||||
| pmmd->psys = NULL; | |||||
| } | |||||
| /* clear modifier */ | /* clear modifier */ | ||||
| psmd = psys_get_modifier(ob, psys); | psmd = psys_get_modifier(ob, psys); | ||||
| BLI_remlink(&ob->modifiers, psmd); | BLI_remlink(&ob->modifiers, psmd); | ||||
| modifier_free((ModifierData *)psmd); | modifier_free((ModifierData *)psmd); | ||||
| /* clear particle system */ | /* clear particle system */ | ||||
| BLI_remlink(&ob->particlesystem, psys); | BLI_remlink(&ob->particlesystem, psys); | ||||
| psys_free(ob, psys); | psys_free(ob, psys); | ||||
| ▲ Show 20 Lines • Show All 1,160 Lines • Show Last 20 Lines | |||||