I did another little change to the code to fix something that was annoying to me.
In the render window you click right button on the image and an info line shows the RGB Alpha and Z values of the pixels you are clicking.
The info shows in the way: R: value G: value B: value A: value… and I changed it to RGB: value, value, value… and also did more clear the separations with “||”. It was difficult to look for the RGB values the way it was before. Look now how easy it shows:
The changes were these:
Index: source/blender/editors/space_image/image_draw.c
===================================================================
--- source/blender/editors/space_image/image_draw.c (revision 33594)
+++ source/blender/editors/space_image/image_draw.c (working copy)
@@ -129,23 +129,23 @@
char str[256];
int ofs;
- ofs= sprintf(str, "X: %4d Y: %4d ", x, y);
+ ofs= sprintf(str, "XY: %4d, %4d ", x, y);
if(cp)
- ofs+= sprintf(str+ofs, "| R: %3d G: %3d B: %3d A: %3d ", cp[0], cp[1], cp[2], cp[3]);
+ ofs+= sprintf(str+ofs, "|| RGB: %3d, %3d, %3d || A: %3d ", cp[0], cp[1], cp[2], cp[3]);
if(fp) {
if(channels==4)
- ofs+= sprintf(str+ofs, "| R: %.3f G: %.3f B: %.3f A: %.3f ", fp[0], fp[1], fp[2], fp[3]);
+ ofs+= sprintf(str+ofs, "|| RGB: %.3f, %.3f, %.3f || A: %.3f ", fp[0], fp[1], fp[2], fp[3]);
else if(channels==1)
- ofs+= sprintf(str+ofs, "| Val: %.3f ", fp[0]);
+ ofs+= sprintf(str+ofs, "|| Val: %.3f ", fp[0]);
else if(channels==3)
- ofs+= sprintf(str+ofs, "| R: %.3f G: %.3f B: %.3f ", fp[0], fp[1], fp[2]);
+ ofs+= sprintf(str+ofs, "|| RGB: %.3f, %.3f, %.3f ", fp[0], fp[1], fp[2]);
}
if(zp)
- ofs+= sprintf(str+ofs, "| Z: %.4f ", 0.5+0.5*(((float)*zp)/(float)0x7fffffff));
+ ofs+= sprintf(str+ofs, "|| Z: %.4f ", 0.5+0.5*(((float)*zp)/(float)0x7fffffff));
if(zpf)
- ofs+= sprintf(str+ofs, "| Z: %.3f ", *zpf);
+ ofs+= sprintf(str+ofs, "|| Z: %.3f ", *zpf);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);