[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55195] trunk/blender/source/blender/ editors/sculpt_paint/paint_image_proj.c: Fix #34589. There was no space conversion being done between layers in
Antony Riakiotakis
kalast at gmail.com
Mon Mar 11 19:11:07 CET 2013
Revision: 55195
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55195
Author: psy-fi
Date: 2013-03-11 18:11:07 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
Fix #34589. There was no space conversion being done between layers in
different colour space when using the clone brush.
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-03-11 16:23:33 UTC (rev 55194)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image_proj.c 2013-03-11 18:11:07 UTC (rev 55195)
@@ -1379,15 +1379,18 @@
}
else { /* from char to float */
unsigned char rgba_ub[4];
+ float rgba[4];
project_face_pixel(tf_other, ibuf_other, w, side, rgba_ub, NULL);
- IMAPAINT_CHAR_RGBA_TO_FLOAT(((ProjPixelClone *)projPixel)->clonepx.f, rgba_ub);
+ srgb_to_linearrgb_uchar4(rgba, rgba_ub);
+ straight_to_premul_v4_v4(((ProjPixelClone *)projPixel)->clonepx.f, rgba);
}
}
else {
if (ibuf_other->rect_float) { /* float to char */
float rgba[4];
project_face_pixel(tf_other, ibuf_other, w, side, NULL, rgba);
- IMAPAINT_FLOAT_RGBA_TO_CHAR(((ProjPixelClone *)projPixel)->clonepx.ch, rgba);
+ premul_to_straight_v4(rgba);
+ linearrgb_to_srgb_uchar3(((ProjPixelClone *)projPixel)->clonepx.ch, rgba);
}
else { /* char to char */
project_face_pixel(tf_other, ibuf_other, w, side, ((ProjPixelClone *)projPixel)->clonepx.ch, NULL);
More information about the Bf-blender-cvs
mailing list