[Bf-blender-cvs] [a3240df2696] blender2.8: Always using full shading for eevee + sculpt mode

Campbell Barton noreply at git.blender.org
Thu Jul 13 11:00:41 CEST 2017


Commit: a3240df269609e8c7cafaeeec8dfbccd07df7cd3
Author: Campbell Barton
Date:   Thu Jul 13 19:09:40 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBa3240df269609e8c7cafaeeec8dfbccd07df7cd3

Always using full shading for eevee + sculpt mode

Also disable for dyntopo & multires since its currently not supported.

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/draw/engines/eevee/eevee_materials.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index cac7066f762..28b9180bfa9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3266,7 +3266,7 @@ class VIEW3D_PT_view3d_display(Panel):
         col.prop(view, "show_only_render")
         col.prop(view, "show_world")
 
-        if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE', 'SCULPT'}:
+        if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
             col.prop(view, "show_mode_shade_override")
 
         col = layout.column()
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index 8b94ffb34c3..d6202dcba6e 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -34,6 +34,8 @@
 #include "BLI_alloca.h"
 
 #include "BKE_particle.h"
+#include "BKE_paint.h"
+#include "BKE_pbvh.h"
 
 #include "GPU_material.h"
 
@@ -928,7 +930,14 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_SceneLayerData *sl
 	const bool do_cull = BKE_collection_engine_property_value_get_bool(ces_mode_ob, "show_backface_culling");
 	const bool is_active = (ob == draw_ctx->obact);
 	const bool is_sculpt_mode = is_active && (ob->mode & OB_MODE_SCULPT) != 0;
+#if 0
 	const bool is_sculpt_mode_draw = is_sculpt_mode && (draw_ctx->v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) == 0;
+#else
+	/* For now just force fully shaded with eevee when supported. */
+	const bool is_sculpt_mode_draw =
+	        is_sculpt_mode &&
+	        ((ob->sculpt && ob->sculpt->pbvh) && (BKE_pbvh_type(ob->sculpt->pbvh) != PBVH_FACES));
+#endif
 	const bool is_default_mode_shader = is_sculpt_mode;
 
 	/* First get materials for this mesh. */




More information about the Bf-blender-cvs mailing list