diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 4f4787f9da5..bc3db11f34b 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -27,8 +27,8 @@ /* these lines are grep'd, watch out for our not-so-awesome regex * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ -#define BLENDER_VERSION 278 -#define BLENDER_SUBVERSION 4 +#define BLENDER_VERSION 280 +#define BLENDER_SUBVERSION 0 /* Several breakages with 270, e.g. constraint deg vs rad */ #define BLENDER_MINVERSION 270 #define BLENDER_MINSUBVERSION 6 diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index d416f4faae4..c93e11a6231 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -210,6 +210,18 @@ void do_versions_after_linking_280(Main *main) } } } + + if (!MAIN_VERSION_ATLEAST(main, 280, 0)) { + IDPropertyTemplate val = {0}; + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + scene->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP); + BKE_layer_collection_engine_settings_create(scene->collection_properties); + } + + for (Object *ob = main->object.first; ob; ob = ob->id.next) { + ob->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP); + } + } } static void do_version_layer_collections_idproperties(ListBase *lb) @@ -242,21 +254,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) } } - if (!DNA_struct_elem_find(fd->filesdna, "Scene", "IDProperty", "collection_properties")) { - IDPropertyTemplate val = {0}; - for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { - scene->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP); - BKE_layer_collection_engine_settings_create(scene->collection_properties); - } - } - - if (!DNA_struct_elem_find(fd->filesdna, "Object", "IDProperty", "collection_properties")) { - IDPropertyTemplate val = {0}; - for (Object *ob = main->object.first; ob; ob = ob->id.next) { - ob->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP); - } - } - if (DNA_struct_elem_find(fd->filesdna, "LayerCollection", "ListBase", "engine_settings") && !DNA_struct_elem_find(fd->filesdna, "LayerCollection", "IDProperty", "properties")) {