diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-09-11 14:33:29 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-09-26 18:35:17 +0300 |
commit | db4571f3c331b635a10c2804360cb9403420d3c7 (patch) | |
tree | 483a1175d78f82c1b352a01cf14e9fc95deb7001 | |
parent | cf2c09002fae1e5b11acc0f21b67ffb29212ad7a (diff) |
Fix T68645: Hair Particle Edit - Particle Mirror crash when children are
visible in the viewport
Seems to be an issue of not correctly freeing the PTCacheEdit (see
T68645 for details), after discussion with sergey we went with the quick
and dirty fix to free the path cache early for now. Other solution of
freeing it in 'psys_cache_paths' for the non-evaluated psys [which would
also fix the particle delete, then undo crash from T69000] needs more
deep investigation and, possibly, reconsideration.
Reviewers: sergey
Maniphest Tasks: T68645
Differential Revision: https://developer.blender.org/D5755
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 1e6ff163225..1e2722ae776 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3539,7 +3539,10 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op)) PE_mirror_x(depsgraph, scene, ob, 0); update_world_cos(ob, edit); + psys_free_path_cache(NULL, edit); + WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob); + BKE_particle_batch_cache_dirty_tag(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL); DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); return OPERATOR_FINISHED; |