[Bf-blender-cvs] [162cb743203] blender-v2.82-release: Fix T67305: Sculptmode Wireframe Coloring

Jeroen Bakker noreply at git.blender.org
Mon Jan 13 12:58:05 CET 2020


Commit: 162cb74320303e91da28f103d0f1cd47442946af
Author: Jeroen Bakker
Date:   Mon Jan 13 12:46:54 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB162cb74320303e91da28f103d0f1cd47442946af

Fix T67305: Sculptmode Wireframe Coloring

When in sculptmode the wireframe coloring should always be disabled.
When an object was sculpted but had modifiers this was not detected and
the colors were still shown.

This fix will disable wireframe coloring for any object that is in
sculptmode.

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

M	source/blender/draw/engines/overlay/overlay_wireframe.c

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

diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c
index b52434fa6c6..d3c513e5963 100644
--- a/source/blender/draw/engines/overlay/overlay_wireframe.c
+++ b/source/blender/draw/engines/overlay/overlay_wireframe.c
@@ -167,9 +167,10 @@ void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata,
 
   /* Don't do that in edit Mesh mode, unless there is a modifier preview. */
   if (use_wire && (!is_mesh || (!is_edit_mode || has_edit_mesh_cage))) {
+    const bool is_sculpt_mode = ((ob->mode & OB_MODE_SCULPT) != 0) && (ob->sculpt != NULL);
     const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) &&
                                  !DRW_state_is_image_render();
-    const bool use_coloring = (use_wire && !is_edit_mode && !use_sculpt_pbvh &&
+    const bool use_coloring = (use_wire && !is_edit_mode && !is_sculpt_mode &&
                                !has_edit_mesh_cage);
     DRWShadingGroup *shgrp = NULL;
     struct GPUBatch *geom = DRW_cache_object_face_wireframe_get(ob);



More information about the Bf-blender-cvs mailing list