Fixed [#21558] ctrl+c a material color and ctr+v it into new texture color results in darker color

This commit is contained in:
Matt Ebb
2010-03-12 02:43:36 +00:00
parent 478e90ffdc
commit 63c71425b7

View File

@@ -1182,6 +1182,9 @@ static int new_exec(bContext *C, wmOperator *op)
uvtestgrid= RNA_boolean_get(op->ptr, "uv_test_grid");
RNA_float_get_array(op->ptr, "color", color);
color[3]= RNA_float_get(op->ptr, "alpha");
if (!floatbuf && scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
linearrgb_to_srgb_v3_v3(color, color);
ima = BKE_add_image_size(width, height, name, floatbuf, uvtestgrid, color);