From 95e052f830807a89f36021b77638a3a5d0c01309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 2 May 2019 16:51:17 +0200 Subject: Fix T63997 Weird z-fight during weight paint PBVH drawing was used even in weightpaint/vertexpaint because both uses the sculpt session. --- source/blender/draw/engines/workbench/workbench_forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/draw/engines/workbench/workbench_forward.c') diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index 7766fe918ca..1d55a54df8d 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -565,7 +565,7 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob) WORKBENCH_MaterialData *material; if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL)) { - const bool is_sculpt_mode = (ob->sculpt != NULL); + const bool is_sculpt_mode = DRW_object_use_pbvh_drawing(ob); bool is_drawn = false; if (!is_sculpt_mode && TEXTURE_DRAWING_ENABLED(wpd) && ELEM(ob->type, OB_MESH)) { -- cgit v1.2.3