diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-22 16:49:00 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-10-22 16:49:00 +0400 |
commit | 4e11fe6c5aec1d609e3ecc2218138b838d253ebf (patch) | |
tree | d57b4f18280c04e50ecb562135fed058cf11b82d /source/blender/makesrna | |
parent | 655e24979bb37c97a34b328238233591cfd5c924 (diff) |
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 46a4a630294..4431eb10a82 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -276,6 +276,7 @@ EnumPropertyItem image_color_mode_items[] = { EnumPropertyItem image_color_depth_items[] = { /* 1 (monochrome) not used */ {R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"}, + {R_IMF_CHAN_DEPTH_10, "10", 0, "10", "10 bit color channels"}, {R_IMF_CHAN_DEPTH_12, "12", 0, "12", "12 bit color channels"}, {R_IMF_CHAN_DEPTH_16, "16", 0, "16", "16 bit color channels"}, /* 24 not used */ @@ -714,6 +715,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value) R_IMF_CHAN_DEPTH_24, R_IMF_CHAN_DEPTH_16, R_IMF_CHAN_DEPTH_12, + R_IMF_CHAN_DEPTH_10, R_IMF_CHAN_DEPTH_8, R_IMF_CHAN_DEPTH_1, 0}; @@ -811,9 +813,10 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, const int is_float = ELEM3(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER); EnumPropertyItem *item_8bit = &image_color_depth_items[0]; - EnumPropertyItem *item_12bit = &image_color_depth_items[1]; - EnumPropertyItem *item_16bit = &image_color_depth_items[2]; - EnumPropertyItem *item_32bit = &image_color_depth_items[3]; + EnumPropertyItem *item_10bit = &image_color_depth_items[1]; + EnumPropertyItem *item_12bit = &image_color_depth_items[2]; + EnumPropertyItem *item_16bit = &image_color_depth_items[3]; + EnumPropertyItem *item_32bit = &image_color_depth_items[4]; int totitem = 0; EnumPropertyItem *item = NULL; @@ -823,6 +826,10 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, RNA_enum_item_add(&item, &totitem, item_8bit); } + if (depth_ok & R_IMF_CHAN_DEPTH_10) { + RNA_enum_item_add(&item, &totitem, item_10bit); + } + if (depth_ok & R_IMF_CHAN_DEPTH_12) { RNA_enum_item_add(&item, &totitem, item_12bit); } @@ -2888,7 +2895,6 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) #endif - #ifdef WITH_OPENJPEG /* Jpeg 2000 */ prop = RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE); @@ -2910,7 +2916,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) /* Cineon and DPX */ prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_CINEON_LOG); + RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_IMF_CINEON_FLAG_LOG); RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); |