diff options
-rw-r--r-- | source/blender/blenloader/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 0a678cfe6f8..61d1aa18b3c 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -81,6 +81,10 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() +if(WITH_CLAY_ENGINE) + add_definitions(-DWITH_CLAY_ENGINE) +endif() + if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index d76a121376c..1c7ecc9ce3b 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -345,7 +345,18 @@ static void do_version_layer_collections_idproperties(ListBase *lb) void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) { + if (!MAIN_VERSION_ATLEAST(main, 280, 0)) { + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + if (STREQ(scene->r.engine, RE_engine_id_BLENDER_RENDER)) { +#ifdef WITH_CLAY_ENGINE + BLI_strncpy(scene->r.engine, RE_engine_id_BLENDER_CLAY, sizeof(scene->r.engine)); +#else + BLI_strncpy(scene->r.engine, RE_engine_id_BLENDER_EEVEE, sizeof(scene->r.engine)); +#endif + } + } + if (!DNA_struct_elem_find(fd->filesdna, "Scene", "ListBase", "render_layers")) { for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { /* Master Collection */ |