diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 15:51:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 15:51:42 +0400 |
commit | f9e00b5c99ba8dfc5bf19a59ab73d8be8f125bf3 (patch) | |
tree | cea447f44b698dcf9a69fc45db887dce638aa89e /source/creator | |
parent | 33e74e9f938bc4e8a733b82c33b9a1113dfb5904 (diff) | |
parent | fd742566a62151c1f2ed1f009782fc8a881fbf5a (diff) |
svn merge ^/trunk/blender -r42009:42053
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/creator.c | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 93cc5ad0d2e..61bb50daa3e 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -612,40 +612,47 @@ static int set_image_type(int argc, const char **argv, void *data) const char *imtype = argv[1]; Scene *scene= CTX_data_scene(C); if (scene) { - if (!strcmp(imtype,"TGA")) scene->r.imtype = R_TARGA; - else if (!strcmp(imtype,"IRIS")) scene->r.imtype = R_IRIS; + char imtype_new; + + if (!strcmp(imtype,"TGA")) imtype_new = R_IMF_IMTYPE_TARGA; + else if (!strcmp(imtype,"IRIS")) imtype_new = R_IMF_IMTYPE_IRIS; #ifdef WITH_DDS - else if (!strcmp(imtype,"DDS")) scene->r.imtype = R_DDS; + else if (!strcmp(imtype,"DDS")) imtype_new = R_IMF_IMTYPE_DDS; #endif - else if (!strcmp(imtype,"JPEG")) scene->r.imtype = R_JPEG90; - else if (!strcmp(imtype,"IRIZ")) scene->r.imtype = R_IRIZ; - else if (!strcmp(imtype,"RAWTGA")) scene->r.imtype = R_RAWTGA; - else if (!strcmp(imtype,"AVIRAW")) scene->r.imtype = R_AVIRAW; - else if (!strcmp(imtype,"AVIJPEG")) scene->r.imtype = R_AVIJPEG; - else if (!strcmp(imtype,"PNG")) scene->r.imtype = R_PNG; - else if (!strcmp(imtype,"AVICODEC")) scene->r.imtype = R_AVICODEC; - else if (!strcmp(imtype,"QUICKTIME")) scene->r.imtype = R_QUICKTIME; - else if (!strcmp(imtype,"BMP")) scene->r.imtype = R_BMP; + else if (!strcmp(imtype,"JPEG")) imtype_new = R_IMF_IMTYPE_JPEG90; + else if (!strcmp(imtype,"IRIZ")) imtype_new = R_IMF_IMTYPE_IRIZ; + else if (!strcmp(imtype,"RAWTGA")) imtype_new = R_IMF_IMTYPE_RAWTGA; + else if (!strcmp(imtype,"AVIRAW")) imtype_new = R_IMF_IMTYPE_AVIRAW; + else if (!strcmp(imtype,"AVIJPEG")) imtype_new = R_IMF_IMTYPE_AVIJPEG; + else if (!strcmp(imtype,"PNG")) imtype_new = R_IMF_IMTYPE_PNG; + else if (!strcmp(imtype,"AVICODEC")) imtype_new = R_IMF_IMTYPE_AVICODEC; + else if (!strcmp(imtype,"QUICKTIME")) imtype_new = R_IMF_IMTYPE_QUICKTIME; + else if (!strcmp(imtype,"BMP")) imtype_new = R_IMF_IMTYPE_BMP; #ifdef WITH_HDR - else if (!strcmp(imtype,"HDR")) scene->r.imtype = R_RADHDR; + else if (!strcmp(imtype,"HDR")) imtype_new = R_IMF_IMTYPE_RADHDR; #endif #ifdef WITH_TIFF - else if (!strcmp(imtype,"TIFF")) scene->r.imtype = R_TIFF; + else if (!strcmp(imtype,"TIFF")) imtype_new = R_IMF_IMTYPE_TIFF; #endif #ifdef WITH_OPENEXR - else if (!strcmp(imtype,"EXR")) scene->r.imtype = R_OPENEXR; - else if (!strcmp(imtype,"MULTILAYER")) scene->r.imtype = R_MULTILAYER; + else if (!strcmp(imtype,"EXR")) imtype_new = R_IMF_IMTYPE_OPENEXR; + else if (!strcmp(imtype,"MULTILAYER")) imtype_new = R_IMF_IMTYPE_MULTILAYER; #endif - else if (!strcmp(imtype,"MPEG")) scene->r.imtype = R_FFMPEG; - else if (!strcmp(imtype,"FRAMESERVER")) scene->r.imtype = R_FRAMESERVER; + else if (!strcmp(imtype,"MPEG")) imtype_new = R_IMF_IMTYPE_FFMPEG; + else if (!strcmp(imtype,"FRAMESERVER")) imtype_new = R_IMF_IMTYPE_FRAMESERVER; #ifdef WITH_CINEON - else if (!strcmp(imtype,"CINEON")) scene->r.imtype = R_CINEON; - else if (!strcmp(imtype,"DPX")) scene->r.imtype = R_DPX; + else if (!strcmp(imtype,"CINEON")) imtype_new = R_IMF_IMTYPE_CINEON; + else if (!strcmp(imtype,"DPX")) imtype_new = R_IMF_IMTYPE_DPX; #endif #ifdef WITH_OPENJPEG - else if (!strcmp(imtype,"JP2")) scene->r.imtype = R_JP2; + else if (!strcmp(imtype,"JP2")) imtype_new = R_IMF_IMTYPE_JP2; #endif - else printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n"); + else { + printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n"); + imtype_new= scene->r.im_format.imtype; + } + + scene->r.im_format.imtype= imtype_new; } else { printf("\nError: no blend loaded. order the arguments so '-F / --render-format' is after the blend is loaded.\n"); |