UI: Reorder EXR compression dropdown and add tooltips #128787
@ -72,16 +72,44 @@
|
||||
|
||||
#ifdef WITH_OPENEXR
|
||||
const EnumPropertyItem rna_enum_exr_codec_items[] = {
|
||||
{R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
|
||||
{R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""},
|
||||
{R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
|
||||
{R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""},
|
||||
{R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""},
|
||||
{R_IMF_EXR_CODEC_ZIPS, "ZIPS", 0, "ZIPS (lossless)", ""},
|
||||
{R_IMF_EXR_CODEC_B44, "B44", 0, "B44 (lossy)", ""},
|
||||
{R_IMF_EXR_CODEC_B44A, "B44A", 0, "B44A (lossy)", ""},
|
||||
{R_IMF_EXR_CODEC_DWAA, "DWAA", 0, "DWAA (lossy)", ""},
|
||||
{R_IMF_EXR_CODEC_DWAB, "DWAB", 0, "DWAB (lossy)", ""},
|
||||
{R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", "No compression"},
|
||||
{R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP", "Lossless zip compression of 16 row image blocks"},
|
||||
{R_IMF_EXR_CODEC_PIZ,
|
||||
"PIZ",
|
||||
0,
|
||||
"PIZ",
|
||||
"Lossless wavelet compression, effective for noisy/grainy images"},
|
||||
{R_IMF_EXR_CODEC_DWAA,
|
||||
"DWAA",
|
||||
0,
|
||||
"DWAA (lossy)",
|
||||
"JPEG-like lossy compression on 32 row image blocks"},
|
||||
{R_IMF_EXR_CODEC_DWAB,
|
||||
"DWAB",
|
||||
0,
|
||||
"DWAB (lossy)",
|
||||
"JPEG-like lossy compression on 256 row image blocks"},
|
||||
{R_IMF_EXR_CODEC_ZIPS,
|
||||
"ZIPS",
|
||||
0,
|
||||
"ZIPS",
|
||||
"Lossless zip compression, each image row compressed separately"},
|
||||
{R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE", "Lossless run length encoding compression"},
|
||||
{R_IMF_EXR_CODEC_PXR24,
|
||||
"PXR24",
|
||||
0,
|
||||
"Pxr24 (lossy)",
|
||||
"Lossy compression for 32 bit float images (stores 24 bits of each float)"},
|
||||
{R_IMF_EXR_CODEC_B44,
|
||||
"B44",
|
||||
0,
|
||||
"B44 (lossy)",
|
||||
"Lossy compression for 16 bit float images, at fixed 2.3:1 ratio"},
|
||||
{R_IMF_EXR_CODEC_B44A,
|
||||
"B44A",
|
||||
0,
|
||||
"B44A (lossy)",
|
||||
"Lossy compression for 16 bit float images, at fixed 2.3:1 ratio"},
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
#endif
|
||||
@ -1515,7 +1543,7 @@ static const EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(bContext
|
||||
}
|
||||
|
||||
for (i = 0; i < R_IMF_EXR_CODEC_MAX; i++) {
|
||||
if (ELEM(i, R_IMF_EXR_CODEC_B44, R_IMF_EXR_CODEC_B44A)) {
|
||||
if (ELEM(rna_enum_exr_codec_items[i].value, R_IMF_EXR_CODEC_B44, R_IMF_EXR_CODEC_B44A)) {
|
||||
continue; /* B44 and B44A are not defined for 32 bit floats */
|
||||
}
|
||||
|
||||
@ -6256,7 +6284,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
|
||||
RNA_def_property_enum_sdna(prop, nullptr, "exr_codec");
|
||||
RNA_def_property_enum_items(prop, rna_enum_exr_codec_items);
|
||||
RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_ImageFormatSettings_exr_codec_itemf");
|
||||
RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
|
||||
RNA_def_property_ui_text(prop, "Codec", "Compression codec settings for OpenEXR");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, nullptr);
|
||||
# endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user