GPU: Fix Crash Sampling in Texture Paint Mode. #106791

Merged
Jeroen Bakker merged 1 commits from Jeroen-Bakker/blender:gpu-color-sampling-texture-paint-mode into main 2023-04-11 11:24:28 +02:00
1 changed files with 3 additions and 1 deletions

View File

@ -214,7 +214,9 @@ static void select_cache_populate(void *vedata, Object *ob)
SELECTID_StorageList *stl = ((SELECTID_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
if (!DRW_object_is_in_edit_mode(ob)) {
const bool retopology_occlusion = RETOPOLOGY_ENABLED(draw_ctx->v3d) &&
!XRAY_ENABLED(draw_ctx->v3d);
if (retopology_occlusion && !DRW_object_is_in_edit_mode(ob)) {
if (ob->dt >= OB_SOLID) {
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(ob->data);
DRW_shgroup_call_obmat(stl->g_data->shgrp_occlude, geom_faces, ob->object_to_world);