diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-13 12:45:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-13 12:50:21 +0300 |
commit | 44fc8aa2216314c1e9418a85140c86bf6bc587bf (patch) | |
tree | dbfdb83ec228c3722d8a314fb6ea6e8b65b7faf8 | |
parent | 5cd6ffad09a50769eb76bd8308b478a917df0ea6 (diff) |
Fix T64403: crash sampling coloring in texture paint mode
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 638c77fc3cb..fbec99c5f28 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -221,6 +221,8 @@ static void bbs_mesh_solid_verts(Depsgraph *UNUSED(depsgraph), { Mesh *me = ob->data; + DRW_mesh_batch_cache_validate(me); + GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me); GPUBatch *geom_verts = DRW_mesh_batch_cache_get_verts_with_select_id(me); DRW_mesh_batch_cache_create_requested(ob, me, NULL, false, true); @@ -239,6 +241,8 @@ static void bbs_mesh_solid_faces(Scene *UNUSED(scene), Mesh *me = ob->data; Mesh *me_orig = DEG_get_original_object(ob)->data; + DRW_mesh_batch_cache_validate(me); + const bool use_hide = (me_orig->editflag & ME_EDIT_PAINT_FACE_SEL); GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me); DRW_mesh_batch_cache_create_requested(ob, me, NULL, false, use_hide); @@ -275,6 +279,8 @@ void draw_object_select_id(Depsgraph *depsgraph, const bool draw_facedot = check_ob_drawface_dot(scene, v3d, ob->dt); const bool use_faceselect = (select_mode & SCE_SELECT_FACE) != 0; + DRW_mesh_batch_cache_validate(me); + BM_mesh_elem_table_ensure(em->bm, BM_VERT | BM_EDGE | BM_FACE); GPUBatch *geom_faces, *geom_edges, *geom_verts, *geom_facedots; |