From 4c2f5ab33e1c3bcb7da1c8229aeafef7e0048632 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 1 Apr 2017 00:04:42 +0200 Subject: [PATCH] Bumping version to 2.80 This should have been done earlier. But now that we may see more activity in master due to bcon3 merges, it is even more important to stress out the separation between master and 2.8. Also I needed the version bump for idproperties doversion (they needed to happen in _after_linking, and we don't have access to DNA_struct_elem_find there). Last but not least, every time I posted a video or image from 2.80, I got someone confused about the version showing in the infobar. --- .../blender/blenkernel/BKE_blender_version.h | 4 +-- .../blenloader/intern/versioning_280.c | 27 +++++++++---------- 2 files changed, 14 insertions(+), 17 deletions(-) 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")) {