Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-03-21 20:09:43 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-03-26 17:39:41 +0300
commit32bb8488389ae8dc9abd8ae5f662ce4a7f16f104 (patch)
tree7b85359925838c73cac2578ab1ce102d209a2713 /source/blender/draw/intern/draw_manager_data.c
parentc32cf06e42fcfd0596d678a407c6e1bd5ca0732a (diff)
Fix T74692: Do not draw nodes with the default face set
The default face set color is white, so we can skip drawing the default face set. This allows to enable again the optimization of not drawing overlays in nodes where the mask is empty. This will still slow down the viewport when a new face set is created for the whole mesh or when inverting the mask, like in previous versions. I also renamed the function to make more clear that now it is checking for both mask and face sets. Reviewed By: brecht Maniphest Tasks: T74692 Differential Revision: https://developer.blender.org/D7207
Diffstat (limited to 'source/blender/draw/intern/draw_manager_data.c')
-rw-r--r--source/blender/draw/intern/draw_manager_data.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index 5a92058001f..94a3e9e8343 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -884,6 +884,11 @@ static float sculpt_debug_colors[9][4] = {
static void sculpt_draw_cb(DRWSculptCallbackData *scd, GPU_PBVH_Buffers *buffers)
{
+
+ if (scd->use_mask && !GPU_pbvh_buffers_has_overlays(buffers)) {
+ return;
+ }
+
GPUBatch *geom = GPU_pbvh_buffers_batch_get(buffers, scd->fast_mode, scd->use_wire);
short index = 0;