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 <j.bakker@atmind.nl>2019-11-01 14:09:55 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-11-27 18:05:54 +0300
commit2e6159a4948cd0f4e0b636734bfe506796bd87f2 (patch)
treefb04244033e45a69c514ec9a0ac6aa6fd28d5a33 /source/blender/imbuf
parent6992fc0b3bf85e985169157b2e7ced1e1ed7fcdf (diff)
Curve: CurveMapping Extend Option
Extend options are currently stored per curve. This was not clearly communicated to the user and they expected this to be a setting per CurveMapping. This change will move the option from `Curve` to `CurveMapping`. In order to support this the API had to be changed. BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what breaks Python API. Cycles has been updated but other add-ons have not. After release of 2.81 we can merge this to master and adapt the add-ons. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6169
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/colormanagement.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index 1b911226c6f..71e9da70c35 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1029,11 +1029,11 @@ void IMB_colormanagement_init_default_view_settings(
static void curve_mapping_apply_pixel(CurveMapping *curve_mapping, float *pixel, int channels)
{
if (channels == 1) {
- pixel[0] = BKE_curvemap_evaluateF(curve_mapping->cm, pixel[0]);
+ pixel[0] = BKE_curvemap_evaluateF(curve_mapping, curve_mapping->cm, pixel[0]);
}
else if (channels == 2) {
- pixel[0] = BKE_curvemap_evaluateF(curve_mapping->cm, pixel[0]);
- pixel[1] = BKE_curvemap_evaluateF(curve_mapping->cm, pixel[1]);
+ pixel[0] = BKE_curvemap_evaluateF(curve_mapping, curve_mapping->cm, pixel[0]);
+ pixel[1] = BKE_curvemap_evaluateF(curve_mapping, curve_mapping->cm, pixel[1]);
}
else {
BKE_curvemapping_evaluate_premulRGBF(curve_mapping, pixel, pixel);
@@ -3904,10 +3904,11 @@ static void curve_mapping_to_ocio_settings(CurveMapping *curve_mapping,
BKE_curvemapping_table_RGBA(
curve_mapping, &curve_mapping_settings->lut, &curve_mapping_settings->lut_size);
+ curve_mapping_settings->use_extend_extrapolate = (curve_mapping->flag &
+ CUMA_EXTEND_EXTRAPOLATE) != 0;
+
for (i = 0; i < 4; i++) {
CurveMap *cuma = curve_mapping->cm + i;
- curve_mapping_settings->use_extend_extrapolate[i] = (cuma->flag & CUMA_EXTEND_EXTRAPOLATE) !=
- 0;
curve_mapping_settings->range[i] = cuma->range;
curve_mapping_settings->mintable[i] = cuma->mintable;
curve_mapping_settings->ext_in_x[i] = cuma->ext_in[0];