Page Menu
Home
Search
Configure Global Search
Log In
Files
F17882
bt29076_no_16bit_tiff.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Bastien Montagne (mont29)
Nov 13 2013, 4:04 PM
Size
3 KB
Subscribers
None
bt29076_no_16bit_tiff.patch
View Options
Index: source/blender/editors/space_image/image_ops.c
===================================================================
--- source/blender/editors/space_image/image_ops.c (révision 41370)
+++ source/blender/editors/space_image/image_ops.c (copie de travail)
@@ -738,9 +738,30 @@
/*if(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER);
else*/
{R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
-#endif
+#endif
{0, NULL, 0, NULL, NULL}};
+static const EnumPropertyItem image_file_subtype_items[] = {
+#ifdef WITH_OPENEXR
+ {R_OPENEXR_HALF, "OPENEXR_HALF", 0, "OpenExr Half", ""},
+ {R_OPENEXR_ZBUF, "OPENEXR_ZBUF", 0, "OpenExr ZBuf", ""},
+#endif
+ {R_PREVIEW_JPG, "PREVIEW_JPG", 0, "Preview Jpg", ""},
+#ifdef WITH_CINEON
+ {R_CINEON_LOG, "CINEON_LOG", 0, "Cineon Log", ""},
+#endif
+#ifdef WITH_TIFF
+ {R_TIFF_16BIT, "TIFF_16BIT", 0, "Tiff 16bit", ""},
+#endif
+#ifdef WITH_OPENJPEG
+ {R_JPEG2K_12BIT, "JPEG2K_12BIT", 0, "Jpeg2000 12bit", ""},
+ {R_JPEG2K_16BIT, "JPEG2K_16BIT", 0, "Jpeg2000 16bit", ""},
+ {R_JPEG2K_YCC, "JPEG2K_YCC", 0, "Jpeg2000 YCC", ""},
+ {R_JPEG2K_CINE_PRESET, "JPEG2K_CINE_PRESET", 0, "Jpeg2000 Cine Preset", ""},
+ {R_JPEG2K_CINE_48FPS, "JPEG2K_CINE_48FPS", 0, "Jpeg2000 Cine 48fps", ""},
+#endif
+ {0, NULL, 0, NULL, NULL}};
+
static void image_filesel(bContext *C, wmOperator *op, const char *path)
{
RNA_string_set(op->ptr, "filepath", path);
@@ -976,7 +997,7 @@
else {
simopts->imtype= BKE_ftype_to_imtype(ibuf->ftype);
}
- simopts->subimtype= scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */
+ simopts->subimtype= scene->r.subimtype;
simopts->quality= ibuf->ftype & 0xff;
BLI_strncpy(simopts->filepath, ibuf->name, sizeof(simopts->filepath));
@@ -1013,7 +1034,7 @@
{
if (RNA_property_is_set(op->ptr, "color_mode")) simopts->planes= RNA_enum_get(op->ptr, "color_mode");
if (RNA_property_is_set(op->ptr, "file_format")) simopts->imtype= RNA_enum_get(op->ptr, "file_format");
- // if (RNA_property_is_set(op->ptr, "subimtype")) simopts->subimtype= RNA_enum_get(op->ptr, "subimtype"); // XXX
+ if (RNA_property_is_set(op->ptr, "subimtype")) simopts->subimtype= RNA_enum_get(op->ptr, "subimtype");
if (RNA_property_is_set(op->ptr, "file_quality")) simopts->quality= RNA_int_get(op->ptr, "file_quality");
if (RNA_property_is_set(op->ptr, "filepath")) {
@@ -1026,7 +1047,7 @@
{
RNA_enum_set(op->ptr, "color_mode", simopts->planes);
RNA_enum_set(op->ptr, "file_format", simopts->imtype);
- // RNA_enum_set(op->ptr, "subimtype", simopts->subimtype);
+ RNA_enum_set(op->ptr, "subimtype", simopts->subimtype);
RNA_int_set(op->ptr, "file_quality", simopts->quality);
RNA_string_set(op->ptr, "filepath", simopts->filepath);
@@ -1206,6 +1227,8 @@
/* format options */
RNA_def_enum(ot->srna, "file_format", image_file_type_items, R_PNG, "File Type", "File type to save image as");
+ RNA_def_enum_flag(ot->srna, "subimtype", image_file_subtype_items, 0, "File Type Flags",
+ "File type flags, e.g. 16bits for TIFF");
RNA_def_enum(ot->srna, "color_mode", image_color_mode_items, R_PLANES24, "Channels", "Image channels to save");
prop= RNA_def_int(ot->srna, "file_quality", 90, 0, 100, "Quality", "", 0, 100);
RNA_def_property_subtype(prop, PROP_PERCENTAGE);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2b/c8/3c84d14fa636bd5be7e0a4e4c6dd
Event Timeline
Log In to Comment