Cleanup: clarify what is scene linear color space in conversion conversion

* Rename ambiguous rgb to scene_linear in some places
* Precompute matrices to directly go to scene instead of through XYZ
* Make function signatures more consistent
This commit is contained in:
2022-05-20 17:54:43 +02:00
parent 469ee7ff15
commit eb5e7d0a31
20 changed files with 119 additions and 109 deletions

View File

@@ -1895,14 +1895,14 @@ static int drop_color_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if (RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) {
if (!gamma) {
IMB_colormanagement_scene_linear_to_srgb_v3(color);
IMB_colormanagement_scene_linear_to_srgb_v3(color, color);
}
RNA_property_float_set_array(&but->rnapoin, but->rnaprop, color);
RNA_property_update(C, &but->rnapoin, but->rnaprop);
}
else if (RNA_property_subtype(but->rnaprop) == PROP_COLOR) {
if (gamma) {
IMB_colormanagement_srgb_to_scene_linear_v3(color);
IMB_colormanagement_srgb_to_scene_linear_v3(color, color);
}
RNA_property_float_set_array(&but->rnapoin, but->rnaprop, color);
RNA_property_update(C, &but->rnapoin, but->rnaprop);