Fix T50673: OpenEXR multilayer image truncated on save
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 16 May 2017 14:34:49 +0000 (16:34 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 16 May 2017 14:34:49 +0000 (16:34 +0200)
The issue is in OpenEXR itself. See the report fomr some more details.

source/blender/blenloader/intern/versioning_270.c
source/blender/makesrna/intern/rna_scene.c

index c187766b5862718427a07491a89193129e831091..d3260db1477e4c82b723aa91510194060c8d7e4c 100644 (file)
@@ -1634,6 +1634,14 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
                        }
                } FOREACH_NODETREE_END
        }
+
+       {
+               for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+                       if (scene->r.im_format.exr_codec == R_IMF_EXR_CODEC_DWAB) {
+                               scene->r.im_format.exr_codec = R_IMF_EXR_CODEC_DWAA;
+                       }
+               }
+       }
 }
 
 void do_versions_after_linking_270(Main *main)
index 9130bdc6f7be6f1d7e604f3afee6f1b3893eb411..333833a79eb2db16e350cf52721ce632169095ed 100644 (file)
@@ -88,7 +88,8 @@ EnumPropertyItem rna_enum_exr_codec_items[] = {
        {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)", ""},
+       /* NOTE: Commented out for until new OpenEXR is released, see T50673. */
+       /* {R_IMF_EXR_CODEC_DWAB, "DWAB", 0, "DWAB (lossy)", ""}, */
        {0, NULL, 0, NULL, NULL}
 };
 #endif