Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b1ddb894e67..dcde4ac421b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7348,6 +7348,67 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree)
}
}
+void do_versions_image_settings_2_60(Scene *sce)
+{
+ /* note: rd->subimtype is moved into indervidual settings now and no longer
+ * exists */
+ RenderData *rd= &sce->r;
+ ImageFormatData *imf= &sce->r.im_format;
+
+ imf->imtype= rd->imtype;
+ imf->planes= rd->planes;
+ imf->compress= rd->quality;
+ imf->quality= rd->quality;
+
+ /* default, was stored in multiple places, may override later */
+ imf->depth= R_IMF_CHAN_DEPTH_8;
+
+ /* openexr */
+ imf->exr_codec = rd->quality & 7; /* strange but true! 0-4 are valid values */
+
+ switch (imf->imtype) {
+ case R_OPENEXR:
+ imf->depth= (rd->subimtype & R_OPENEXR_HALF) ? R_IMF_CHAN_DEPTH_16 : R_IMF_CHAN_DEPTH_32;
+ if (rd->subimtype & R_PREVIEW_JPG) {
+ imf->flag |= R_IMF_FLAG_PREVIEW_JPG;
+ }
+ if (rd->subimtype & R_OPENEXR_ZBUF) {
+ imf->flag |= R_IMF_FLAG_ZBUF;
+ }
+ break;
+ case R_TIFF:
+ if (rd->subimtype & R_TIFF_16BIT) {
+ imf->depth= R_IMF_CHAN_DEPTH_16;
+ }
+ break;
+ case R_JP2:
+ if (rd->subimtype & R_JPEG2K_16BIT) {
+ imf->depth= R_IMF_CHAN_DEPTH_16;
+ }
+ else if (rd->subimtype & R_JPEG2K_12BIT) {
+ imf->depth= R_IMF_CHAN_DEPTH_12;
+ }
+
+ if (rd->subimtype & R_JPEG2K_YCC) {
+ imf->jp2_flag |= R_IMF_JP2_FLAG_YCC;
+ }
+ if (rd->subimtype & R_JPEG2K_CINE_PRESET) {
+ imf->jp2_flag |= R_IMF_JP2_FLAG_CINE_PRESET;
+ }
+ if (rd->subimtype & R_JPEG2K_CINE_48FPS) {
+ imf->jp2_flag |= R_IMF_JP2_FLAG_CINE_48;
+ }
+ break;
+ case R_CINEON:
+ case R_DPX:
+ if (rd->subimtype & R_CINEON_LOG) {
+ imf->cineon_flag |= R_IMF_CINEON_FLAG_LOG;
+ }
+ break;
+ }
+
+}
+
static void do_versions(FileData *fd, Library *lib, Main *main)
{
/* WATCH IT!!!: pointers from libdata have not been converted */
@@ -12544,6 +12605,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* put compatibility code here until next subversion bump */
{
+ Scene *sce;
+ for(sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->r.im_format.depth == 0) {
+ do_versions_image_settings_2_60(sce);
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */