Fix T64329 Crash when switching to Texture Paint

This commit is contained in:
Clément Foucault 2019-05-09 12:10:47 +02:00
parent d2520511d2
commit 209c01a6ba
Notes: blender-bot 2023-02-14 08:29:54 +01:00
Referenced by issue #64456, Bridge edge loop crash
Referenced by issue #64329, Crash when switching to UVEditing or Texture Paint
Referenced by issue #61474, Laggy interaction with gizmos, does not happen when running other 3D apps at the same time
2 changed files with 3 additions and 1 deletions

View File

@ -4922,7 +4922,7 @@ void DRW_mesh_batch_cache_create_requested(
}
}
if (cache->batch_requested & (MBC_SURFACE | MBC_SURF_PER_MAT)) {
if (cache->batch_requested & (MBC_SURFACE | MBC_SURF_PER_MAT | MBC_WIRE_LOOPS_UVS)) {
/* Optimization : Only create orco layer if mesh is deformed. */
if (cache->cd_needed.orco != 0) {
CustomData *cd_vdata = (me->edit_mesh) ? &me->edit_mesh->bm->vdata : &me->vdata;

View File

@ -207,6 +207,7 @@ static void draw_uvs_shadow(SpaceImage *UNUSED(sima),
float col[4];
UI_GetThemeColor4fv(TH_UV_SHADOW, col);
DRW_mesh_batch_cache_validate(me);
GPUBatch *edges = DRW_mesh_batch_cache_get_uv_edges(me);
DRW_mesh_batch_cache_create_requested(eval_ob, me, scene->toolsettings, false, false);
@ -229,6 +230,7 @@ static void draw_uvs_texpaint(Scene *scene, Object *ob, Depsgraph *depsgraph)
return;
}
DRW_mesh_batch_cache_validate(me);
GPUBatch *geom = DRW_mesh_batch_cache_get_uv_edges(me);
DRW_mesh_batch_cache_create_requested(eval_ob, me, scene->toolsettings, false, false);