[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49952] trunk/blender/source/blender/ editors: HDR color picking was not working for node space
Campbell Barton
ideasman42 at gmail.com
Fri Aug 17 15:00:11 CEST 2012
Revision: 49952
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49952
Author: campbellbarton
Date: 2012-08-17 13:00:11 +0000 (Fri, 17 Aug 2012)
Log Message:
-----------
HDR color picking was not working for node space
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_image/image_ops.c
trunk/blender/source/blender/editors/space_node/node_view.c
Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c 2012-08-17 12:58:31 UTC (rev 49951)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c 2012-08-17 13:00:11 UTC (rev 49952)
@@ -1975,7 +1975,7 @@
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
- if (ibuf->profile == IB_PROFILE_LINEAR_RGB) {
+ if (ELEM(ibuf->profile, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE)) {
linearrgb_to_srgb_v3_v3(r_col, fp);
}
else {
Modified: trunk/blender/source/blender/editors/space_node/node_view.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_view.c 2012-08-17 12:58:31 UTC (rev 49951)
+++ trunk/blender/source/blender/editors/space_node/node_view.c 2012-08-17 13:00:11 UTC (rev 49952)
@@ -383,8 +383,8 @@
if (ibuf->rect_float) {
fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x));
-
- if (ibuf->profile == IB_PROFILE_LINEAR_RGB) {
+ /* IB_PROFILE_NONE is default but infact its linear */
+ if (ELEM(ibuf->profile, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE)) {
linearrgb_to_srgb_v3_v3(r_col, fp);
}
else {
@@ -437,7 +437,7 @@
if (fx >= 0.0f && fy >= 0.0f && fx < 1.0f && fy < 1.0f) {
float *fp;
- char *cp;
+ unsigned char *cp;
int x = (int)(fx * ibuf->x), y = (int)(fy * ibuf->y);
CLAMP(x, 0, ibuf->x - 1);
@@ -449,7 +449,7 @@
info->channels = ibuf->channels;
if (ibuf->rect) {
- cp = (char *)(ibuf->rect + y * ibuf->x + x);
+ cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x);
info->col[0] = cp[0];
info->col[1] = cp[1];
More information about the Bf-blender-cvs
mailing list