[Bf-blender-cvs] [834d3962b99] master: Use the same string for DNA enum and CLI argument for EXR image format setting

Sybren A. Stüvel noreply at git.blender.org
Tue Mar 12 16:21:53 CET 2019


Commit: 834d3962b99df675788021766679e7e889694926
Author: Sybren A. Stüvel
Date:   Tue Mar 12 16:17:47 2019 +0100
Branches: master
https://developer.blender.org/rB834d3962b99df675788021766679e7e889694926

Use the same string for DNA enum and CLI argument for EXR image format setting

The `--render-format` CLI option takes `EXR` and `MULTILAYER`, whereas
the DNA image format render setting uses `OPEN_EXR` and
`OPEN_EXR_MULTILAYER`. This commit adds the DNA values to the CLI
argument, so that it is possible to take the selected value from DNA and
pass it as-is to the CLI. This is used in Flamenco, for example.

The `OPEN_EXR` and `OPEN_EXR_MULTILAYER` are now aliases, so both the
existing and the new options keep working.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: fsiddi

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D4502

===================================================================

M	source/blender/blenkernel/intern/image.c
M	source/creator/creator_args.c

===================================================================

diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index f49858944fa..5955c941285 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1259,6 +1259,8 @@ char BKE_imtype_from_arg(const char *imtype_arg)
 	else if (STREQ(imtype_arg, "TIFF")) return R_IMF_IMTYPE_TIFF;
 #endif
 #ifdef WITH_OPENEXR
+	else if (STREQ(imtype_arg, "OPEN_EXR")) return R_IMF_IMTYPE_OPENEXR;
+	else if (STREQ(imtype_arg, "OPEN_EXR_MULTILAYER")) return R_IMF_IMTYPE_MULTILAYER;
 	else if (STREQ(imtype_arg, "EXR")) return R_IMF_IMTYPE_OPENEXR;
 	else if (STREQ(imtype_arg, "MULTILAYER")) return R_IMF_IMTYPE_MULTILAYER;
 #endif
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 4fe5371152d..f96677d5132 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -1308,8 +1308,8 @@ static const char arg_handle_image_type_set_doc[] =
 "\tSet the render format.\n"
 "\tValid options are 'TGA' 'RAWTGA' 'JPEG' 'IRIS' 'IRIZ' 'AVIRAW' 'AVIJPEG' 'PNG' 'BMP'\n"
 "\n"
-"\tFormats that can be compiled into Blender, not available on all systems: 'HDR' 'TIFF' 'EXR' 'MULTILAYER'\n"
-"\t'MPEG' 'CINEON' 'DPX' 'DDS' 'JP2'"
+"\tFormats that can be compiled into Blender, not available on all systems: 'HDR' 'TIFF' 'OPEN_EXR'\n"
+"\t'OPEN_EXR_MULTILAYER' 'MPEG' 'CINEON' 'DPX' 'DDS' 'JP2'"
 ;
 static int arg_handle_image_type_set(int argc, const char **argv, void *data)
 {



More information about the Bf-blender-cvs mailing list