Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-30 18:17:11 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-30 18:17:11 +0400
commitd7d856a23de2b6751a46632130f941a71377d134 (patch)
tree67662eadc78a4145eba4f0a9e04655cb1adb9edb /source/blender/makesdna
parent424e09a2cec805aa67824385c16a1d267fb1022b (diff)
Color management: add "Color Unpremultiply" option for images and render settings.
For premultiplied alpha images, this makes any color space conversion for the image or render output work on color without alpha multiplied in. This is typically useful to avoid fringing when the image was or will be composited over a light background. If the image will be composited over a black background on the other hand, leaving this option off will give correct results. In an ideal world, there should never be any color space conversion on images with alpha, since it's undefined what to do then, but in practice it's useful to have this option. Patch by Troy Sobotka, with changes by me.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_image_types.h16
-rw-r--r--source/blender/makesdna/DNA_scene_types.h3
2 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index fc8807d0f7c..a1b0ab06ecd 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -112,14 +112,14 @@ typedef struct Image {
/* **************** IMAGE ********************* */
/* Image.flag */
-#define IMA_FIELDS 1
-#define IMA_STD_FIELD 2
-#define IMA_DO_PREMUL 4
-
-#define IMA_REFLECT 16
-#define IMA_NOCOLLECT 32
-#define IMA_DEPRECATED 64
-#define IMA_OLD_PREMUL 128
+#define IMA_FIELDS 1
+#define IMA_STD_FIELD 2
+#define IMA_DO_PREMUL 4
+#define IMA_REFLECT 16
+#define IMA_NOCOLLECT 32
+#define IMA_DEPRECATED 64
+#define IMA_OLD_PREMUL 128
+#define IMA_CM_PREDIVIDE 256
/* Image.tpageflag */
#define IMA_TILES 1
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index d1ab12433fb..9b49bc53ef3 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1100,7 +1100,8 @@ typedef struct Scene {
#define R_ALPHAKEY 2
/* color_mgt_flag */
-#define R_COLOR_MANAGEMENT 1
+#define R_COLOR_MANAGEMENT (1 << 0)
+#define R_COLOR_MANAGEMENT_PREDIVIDE (1 << 1)
/* subimtype, flag options for imtype */
#define R_OPENEXR_HALF 1 /*deprecated*/