Update paint wire when changing modes

This commit is contained in:
Luca Rood 2017-05-05 17:40:42 +02:00
parent 8d9c484152
commit 5539544958
1 changed files with 4 additions and 0 deletions

View File

@ -1822,6 +1822,8 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
ED_vgroup_sync_from_pose(ob);
}
BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_PAINT);
/* Weightpaint works by overriding colors in mesh,
* so need to make sure we recalc on enter and
* exit (exit needs doing regardless because we
@ -2589,6 +2591,8 @@ static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op)
BKE_paint_init(scene, ePaintVertex, PAINT_CURSOR_VERTEX_PAINT);
}
BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_PAINT);
/* update modifier stack for mapping requirements */
DAG_id_tag_update(&me->id, 0);