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:
authorJeroen Bakker <jeroen@blender.org>2022-04-08 09:19:15 +0300
committerJeroen Bakker <jeroen@blender.org>2022-04-08 09:21:25 +0300
commitd466b0378a3c6deb04955ea286e9a8c245e243b5 (patch)
tree3e0cf0ee14a4e7d311f674b38ef707439183c684
parentc71027705c37a31ccb41ae3910008497cd419798 (diff)
Revert removal of force shading color to vertex colors.temp-T96709-painting-target
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c10
1 files changed, 10 insertions, 0 deletions
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));