diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 14:04:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 14:04:51 +0400 |
commit | a87c5eb52cd4951b138f518bf12d498bc5e5eb8a (patch) | |
tree | 7b023285cb2ff41924d9e390f3d6a25715284d14 /source/blender/editors/object | |
parent | 47514a0d7129ba49cd9ad039a886c52909ea565d (diff) |
use color conversions functions in more places.
also add rgba_float_to_uchar, rgba_uchar_to_float
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_bake.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index a02b90a1d16..6ec778d7ee9 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -807,10 +807,8 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm, ibuf->userflags= IB_RECT_INVALID; } else { - char *rrgb= (char*)ibuf->rect + pixel*4; - rrgb[0]= FTOCHAR(vec[0]); - rrgb[1]= FTOCHAR(vec[1]); - rrgb[2]= FTOCHAR(vec[2]); + unsigned char *rrgb= (unsigned char *)ibuf->rect + pixel*4; + rgb_float_to_uchar(rrgb, vec); rrgb[3]= 255; } } |