Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/particle_edit.c
| Show First 20 Lines • Show All 5,318 Lines • ▼ Show 20 Lines | if (psys->edit->edited || 1) { | ||||
| psys->free_edit = NULL; | psys->free_edit = NULL; | ||||
| psys->recalc |= ID_RECALC_PSYS_RESET; | psys->recalc |= ID_RECALC_PSYS_RESET; | ||||
| psys->flag &= ~PSYS_GLOBAL_HAIR; | psys->flag &= ~PSYS_GLOBAL_HAIR; | ||||
| psys->flag &= ~PSYS_EDITED; | psys->flag &= ~PSYS_EDITED; | ||||
| psys_reset(psys, PSYS_RESET_DEPSGRAPH); | psys_reset(psys, PSYS_RESET_DEPSGRAPH); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob); | WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob); | ||||
| BKE_particle_batch_cache_dirty_tag(psys, BKE_PARTICLE_BATCH_DIRTY_ALL); | |||||
| DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| } | } | ||||
| else { /* some operation might have protected hair from editing so let's clear the flag */ | else { /* some operation might have protected hair from editing so let's clear the flag */ | ||||
| psys->recalc |= ID_RECALC_PSYS_RESET; | psys->recalc |= ID_RECALC_PSYS_RESET; | ||||
| psys->flag &= ~PSYS_GLOBAL_HAIR; | psys->flag &= ~PSYS_GLOBAL_HAIR; | ||||
| psys->flag &= ~PSYS_EDITED; | psys->flag &= ~PSYS_EDITED; | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob); | WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob); | ||||
| ▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines | |||||