Sampling float colors in Image Editor only showed 3 digits precision.
authorTon Roosendaal <ton@blender.org>
Sat, 26 Feb 2011 18:39:21 +0000 (18:39 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 26 Feb 2011 18:39:21 +0000 (18:39 +0000)
Let's make it four! :)

source/blender/editors/space_image/image_draw.c

index 4abddf18c20925ec2900a127a673b6af036b0ee2..2f79131c1e7326f8777d7fcb31a821596657a071 100644 (file)
@@ -138,11 +138,11 @@ void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *f
 
        if(fp) {
                if(channels==4)
-                       ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.3f G: %.3f B: %.3f A: %.3f ", fp[0], fp[1], fp[2], fp[3]);
+                       ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.4f G: %.4f B: %.4f A: %.4f ", fp[0], fp[1], fp[2], fp[3]);
                else if(channels==1)
-                       ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| Val: %.3f ", fp[0]);
+                       ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| Val: %.4f ", fp[0]);
                else if(channels==3)
-                       ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.3f G: %.3f B: %.3f ", fp[0], fp[1], fp[2]);
+                       ofs+= BLI_snprintf(str + ofs, sizeof(str)-ofs, "| R: %.4f G: %.4f B: %.4f ", fp[0], fp[1], fp[2]);
        }
 
        if(zp)