Commit: 4c24782ccf35a58edb8c9b33d0594b278715a6ec
Author: Campbell Barton
Date:   Wed Jan 23 08:46:26 2019 +1100
Branches: master
https://developer.blender.org/rB4c24782ccf35a58edb8c9b33d0594b278715a6ec

DRW: only show hidden geometry when selection is used

Matches 2.7x behavior.

===================================================================

M       source/blender/draw/intern/draw_cache.c

===================================================================

diff --git a/source/blender/draw/intern/draw_cache.c 
b/source/blender/draw/intern/draw_cache.c
index 6fe477b50c6..07695702cab 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -40,6 +40,7 @@
 #include "BLI_listbase.h"
 
 #include "BKE_object.h"
+#include "BKE_paint.h"
 #include "BKE_object_deform.h"
 
 #include "GPU_batch.h"
@@ -3753,8 +3754,11 @@ void drw_batch_cache_generate_requested(Object *ob)
        const ToolSettings *ts = draw_ctx->scene->toolsettings;
        const int mode = CTX_data_mode_enum_ex(draw_ctx->object_edit, 
draw_ctx->obact, draw_ctx->object_mode);
        const bool is_paint_mode = ELEM(mode, CTX_MODE_PAINT_TEXTURE, 
CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT);
-       const bool use_hide = (ob->type == OB_MESH) && ((is_paint_mode && (ob 
== draw_ctx->obact)) ||
-                                                      ((mode == 
CTX_MODE_EDIT_MESH) && BKE_object_is_in_editmode(ob)));
+       const bool use_hide = (
+               (ob->type == OB_MESH) &&
+               ((is_paint_mode && (ob == draw_ctx->obact) &&
+                 (BKE_paint_select_face_test(ob) || 
BKE_paint_select_vert_test(ob))) ||
+                ((mode == CTX_MODE_EDIT_MESH) && 
BKE_object_is_in_editmode(ob))));
 
        struct Mesh *mesh_eval = ob->runtime.mesh_eval;
        switch (ob->type) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to