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:
authorDalai Felinto <dalai@blender.org>2022-05-23 16:57:33 +0300
committerDalai Felinto <dalai@blender.org>2022-05-23 16:57:33 +0300
commit3e4f84d10d248fd44ad7365f102ba1a44d655fe3 (patch)
treee59ef5067cb69620f641a5f7d87786bf3a5c40ac /source/blender/editors/sculpt_paint
parent09292b89c3354dc099f3f1f1c37ad3bfbdb53dff (diff)
parenteb5e7d0a31eed698909c23ab0ca89c8fd4929365 (diff)
Merge remote-tracking branch 'origin/blender-v3.2-release'
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.cc4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_expand.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_filter_color.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_ops.c3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_color.c2
6 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc
index 572e5b78b74..a313489885d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.cc
+++ b/source/blender/editors/sculpt_paint/paint_image.cc
@@ -359,9 +359,7 @@ void paint_brush_color_get(struct Scene *scene,
}
/* Gradient / Color-band colors are not considered #PROP_COLOR_GAMMA.
* Brush colors are expected to be in sRGB though. */
- IMB_colormanagement_scene_linear_to_srgb_v3(color_gr);
-
- copy_v3_v3(color, color_gr);
+ IMB_colormanagement_scene_linear_to_srgb_v3(color, color_gr);
}
else {
copy_v3_v3(color, BKE_brush_color_get(scene, br));
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 16b22775b9e..fb1c8ceaa1a 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -331,8 +331,7 @@ static Color vpaint_get_current_col(Scene *scene, VPaint *vp, bool secondary)
float color[4];
const float *brush_color = secondary ? BKE_brush_secondary_color_get(scene, brush) :
BKE_brush_color_get(scene, brush);
- copy_v3_v3(color, brush_color);
- IMB_colormanagement_srgb_to_scene_linear_v3(color);
+ IMB_colormanagement_srgb_to_scene_linear_v3(color, brush_color);
color[3] = 1.0f; /* alpha isn't used, could even be removed to speedup paint a little */
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 46940b619e6..644f14905ba 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -2001,7 +2001,7 @@ static void sculpt_expand_cache_initial_config_set(bContext *C,
BKE_curvemapping_init(expand_cache->brush->curve);
copy_v4_fl(expand_cache->fill_color, 1.0f);
copy_v3_v3(expand_cache->fill_color, BKE_brush_color_get(ss->scene, expand_cache->brush));
- IMB_colormanagement_srgb_to_scene_linear_v3(expand_cache->fill_color);
+ IMB_colormanagement_srgb_to_scene_linear_v3(expand_cache->fill_color, expand_cache->fill_color);
expand_cache->scene = CTX_data_scene(C);
expand_cache->mtex = &expand_cache->brush->mtex;
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c
index f71a814aff4..26d18823b37 100644
--- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c
@@ -298,7 +298,7 @@ static int sculpt_color_filter_modal(bContext *C, wmOperator *op, const wmEvent
float fill_color[3];
RNA_float_get_array(op->ptr, "fill_color", fill_color);
- IMB_colormanagement_srgb_to_scene_linear_v3(fill_color);
+ IMB_colormanagement_srgb_to_scene_linear_v3(fill_color, fill_color);
if (filter_strength < 0.0 && !ss->filter_cache->pre_smoothed_color) {
sculpt_color_presmooth_init(ss);
diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c
index 8803c95aab1..dc620f0ee93 100644
--- a/source/blender/editors/sculpt_paint/sculpt_ops.c
+++ b/source/blender/editors/sculpt_paint/sculpt_ops.c
@@ -781,8 +781,7 @@ static int sculpt_sample_color_invoke(bContext *C, wmOperator *op, const wmEvent
}
float color_srgb[3];
- copy_v3_v3(color_srgb, active_vertex_color);
- IMB_colormanagement_scene_linear_to_srgb_v3(color_srgb);
+ IMB_colormanagement_scene_linear_to_srgb_v3(color_srgb, active_vertex_color);
BKE_brush_color_set(scene, brush, color_srgb);
WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush);
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
index 7a8a6e8e484..ac05652b058 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
@@ -124,7 +124,7 @@ static void do_paint_brush_task_cb_ex(void *__restrict userdata,
copy_v3_v3(brush_color,
ss->cache->invert ? BKE_brush_secondary_color_get(ss->scene, brush) :
BKE_brush_color_get(ss->scene, brush));
- IMB_colormanagement_srgb_to_scene_linear_v3(brush_color);
+ IMB_colormanagement_srgb_to_scene_linear_v3(brush_color, brush_color);
BKE_pbvh_vertex_iter_begin (ss->pbvh, data->nodes[n], vd, PBVH_ITER_UNIQUE) {
SCULPT_orig_vert_data_update(&orig_data, &vd);