Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image.c
| Show First 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | if (br->flag & BRUSH_USE_GRADIENT) { | ||||
| BKE_colorband_evaluate(br->gradient, coord, color_gr); | BKE_colorband_evaluate(br->gradient, coord, color_gr); | ||||
| break; | break; | ||||
| } | } | ||||
| case BRUSH_GRADIENT_SPACING_CLAMP: { | case BRUSH_GRADIENT_SPACING_CLAMP: { | ||||
| BKE_colorband_evaluate(br->gradient, distance / br->gradient_spacing, color_gr); | BKE_colorband_evaluate(br->gradient, distance / br->gradient_spacing, color_gr); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| /* Gradient / Colorband 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); | copy_v3_v3(color, color_gr); | ||||
| } | } | ||||
| else { | else { | ||||
| copy_v3_v3(color, BKE_brush_color_get(scene, br)); | copy_v3_v3(color, BKE_brush_color_get(scene, br)); | ||||
| } | } | ||||
| } | } | ||||
| if (color_correction) { | if (color_correction) { | ||||
| IMB_colormanagement_display_to_scene_linear_v3(color, display); | IMB_colormanagement_display_to_scene_linear_v3(color, display); | ||||
| ▲ Show 20 Lines • Show All 955 Lines • Show Last 20 Lines | |||||