[Bf-blender-cvs] [d466b0378a3] temp-T96709-painting-target: Revert removal of force shading color to vertex colors.

Jeroen Bakker noreply at git.blender.org
Fri Apr 8 08:27:08 CEST 2022


Commit: d466b0378a3c6deb04955ea286e9a8c245e243b5
Author: Jeroen Bakker
Date:   Fri Apr 8 08:19:15 2022 +0200
Branches: temp-T96709-painting-target
https://developer.blender.org/rBd466b0378a3c6deb04955ea286e9a8c245e243b5

Revert removal of force shading color to vertex colors.

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

M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index b4f731402cb..24c5a9fce52 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5192,6 +5192,16 @@ static bool sculpt_stroke_test_start(bContext *C, struct wmOperator *op, const f
     Object *ob = CTX_data_active_object(C);
     SculptSession *ss = ob->sculpt;
     Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+    Brush *brush = BKE_paint_brush(&sd->paint);
+
+    /* NOTE: This should be removed when paint mode is available. Paint mode can force based on the
+     * canvas it is painting on. (ref. use_sculpt_texture_paint). */
+    if (brush && SCULPT_TOOL_NEEDS_COLOR(brush->sculpt_tool)) {
+      View3D *v3d = CTX_wm_view3d(C);
+      if (v3d) {
+        v3d->shading.color_type = V3D_SHADING_VERTEX_COLOR;
+      }
+    }
 
     ED_view3d_init_mats_rv3d(ob, CTX_wm_region_view3d(C));



More information about the Bf-blender-cvs mailing list