diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-06-26 22:57:19 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-06-29 18:25:27 +0300 |
commit | bf87df34855acb394d8c966f055b96bd2d78ea79 (patch) | |
tree | 2a2a8f090b5cfc6141e213fe388b87af8c6987fa /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 3118636f81a45d39e79e7a9a287056de1e8123cd (diff) |
Fix T78323: Enable Unified and Secondary colors for Scultp Vertex Colors
The report does not include any file, but probably that file is using the
settings for unified colors, which are currently not available in the UI,
so it always paints black. This enables unified colors and secondary
colors for sculpt vertex colors, so it should solve that issue.
Unified color does not make much sense now as the Paint tool is the only
one that has paint capabilities, but it will do in the future when
sculpt and paint at the same time is enabled and the paint capability is
added to more tools.
Reviewed By: sergey
Maniphest Tasks: T78323
Differential Revision: https://developer.blender.org/D8136
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index e2d69c7b0be..c45f01ae7cd 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -8108,6 +8108,7 @@ static int sculpt_sample_color_invoke(bContext *C, const wmEvent *UNUSED(e)) { Sculpt *sd = CTX_data_tool_settings(C)->sculpt; + Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); Brush *brush = BKE_paint_brush(&sd->paint); SculptSession *ss = ob->sculpt; @@ -8116,10 +8117,9 @@ static int sculpt_sample_color_invoke(bContext *C, if (!active_vertex_color) { return OPERATOR_CANCELLED; } - brush->rgb[0] = active_vertex_color[0]; - brush->rgb[1] = active_vertex_color[1]; - brush->rgb[2] = active_vertex_color[2]; - brush->alpha = active_vertex_color[3]; + + BKE_brush_color_set(scene, brush, active_vertex_color); + BKE_brush_alpha_set(scene, brush, active_vertex_color[3]); WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush); |