diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-17 16:32:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-17 16:32:13 +0400 |
commit | 1465b06fad0f6240c73f8bc9f2295912ff8e8d8f (patch) | |
tree | aedb7f002920b7ec62a8b1de9660c8e35d97ae52 /source/blender/editors/space_image | |
parent | dac761057d16e264a74162ba625bdb3c6cf07fb4 (diff) |
code cleanup:
- pass wire color to camera draw_viewport_object_reconstruction() rather then getting the theme color directly.
this makes a change where selection color wont be used for unselected cameras (which IMHO is better, drawing selected wire color on nonselected cameras was confusing).
- use rgb_uchar_to_float()
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 30480bd095f..9e16f984e09 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1985,9 +1985,7 @@ int ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], floa } else if (ibuf->rect) { cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); - r_col[0] = cp[0] / 255.0f; - r_col[1] = cp[1] / 255.0f; - r_col[2] = cp[2] / 255.0f; + rgb_uchar_to_float(r_col, cp); ret = TRUE; } } |