Particle edit: Use proper batch cache flag
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 15 May 2018 09:23:27 +0000 (11:23 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 15 May 2018 15:20:02 +0000 (17:20 +0200)
Also tag batch for invalidation when using cut brush.

source/blender/editors/physics/particle_edit.c

index 5aabebe44a0e15605bab0d24f56658a64d56b841..3ade4b90ab14b4588632f805260917c624c9e0b0 100644 (file)
@@ -4002,7 +4002,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
 
                if (edit->psys) {
                        WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
-                       BKE_particle_batch_cache_dirty(edit->psys, BKE_MESH_BATCH_DIRTY_ALL);
+                       BKE_particle_batch_cache_dirty(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
                        DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
                }
                else {
@@ -4267,6 +4267,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op))
                
                if (edit->psys) {
                        WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
+                       BKE_particle_batch_cache_dirty(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
                }
                else {
                        DEG_id_tag_update(&ob->id, OB_RECALC_DATA);