Index: release/scripts/startup/bl_ui/space_image.py =================================================================== --- release/scripts/startup/bl_ui/space_image.py (revision 45380) +++ release/scripts/startup/bl_ui/space_image.py (working copy) @@ -265,6 +265,7 @@ layout.separator() + layout.prop(uv, "dim_image") layout.prop(toolsettings, "use_uv_sculpt") layout.separator() Index: source/blender/editors/space_image/image_draw.c =================================================================== --- source/blender/editors/space_image/image_draw.c (revision 45380) +++ source/blender/editors/space_image/image_draw.c (working copy) @@ -514,8 +514,15 @@ * convert them, and optionally apply curves */ image_verify_buffer_float(ima, ibuf, color_manage); - if (ibuf->rect) - glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); + if (sima->flag & SI_DIMIMG) + { + glPixelTransferf(GL_RED_SCALE, 0.5f); + glPixelTransferf(GL_GREEN_SCALE, 0.5f); + glPixelTransferf(GL_BLUE_SCALE, 0.5f); + } + + if (ibuf->rect) + glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); #if 0 else glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float); @@ -527,6 +534,11 @@ /* reset zoom */ glPixelZoom(1.0f, 1.0f); + + /* Reset dim image */ + glPixelTransferf(GL_RED_SCALE, 1.0f); + glPixelTransferf(GL_GREEN_SCALE, 1.0f); + glPixelTransferf(GL_BLUE_SCALE, 1.0f); } static unsigned int *get_part_from_ibuf(ImBuf *ibuf, short startx, short starty, short endx, short endy) Index: source/blender/makesdna/DNA_space_types.h =================================================================== --- source/blender/makesdna/DNA_space_types.h (revision 45380) +++ source/blender/makesdna/DNA_space_types.h (working copy) @@ -714,6 +714,7 @@ #define SI_USE_ALPHA (1<<12) #define SI_SHOW_ALPHA (1<<13) #define SI_SHOW_ZBUF (1<<14) +#define SI_DIMIMG (1<<15) /* dim the image to be easier on the eye */ /* next two for render window dislay */ #define SI_PREVSPACE (1<<15) #define SI_FULLWINDOW (1<<16) Index: source/blender/makesrna/intern/rna_space.c =================================================================== --- source/blender/makesrna/intern/rna_space.c (revision 45380) +++ source/blender/makesrna/intern/rna_space.c (working copy) @@ -1187,6 +1187,12 @@ RNA_def_property_enum_items(prop, pivot_items); RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); + + prop = RNA_def_property(srna, "dim_image", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DIMIMG); + RNA_def_property_ui_text(prop, "Dim image", + "Dims the image to be easier on the eye"); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); } static void rna_def_space_outliner(BlenderRNA *brna)