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:
authorBastien Montagne <mont29>2021-07-06 18:22:18 +0300
committerBastien Montagne <bastien@blender.org>2021-07-06 18:24:26 +0300
commitb05ba2ef0eda1c1913515383f9faeaaf48dfd457 (patch)
tree38b9b69ffdac4898956337c04263d977491471ae /source/blender/blenloader
parent7af40ccf5f22795da4122ac20c966a352cae4eaf (diff)
Rename Scene's embeded collections from "Master Collection" to "Scene Collection"
Note that this name is essentially never used anywhere, besides as 'information' mostly accessible from python console. Those embedded IDs are not in Main, so they are not accessible by name ever, and mostly unusable from animation perspective (either drivers or fcurves). Therefore, no breakage is expected in user scripts or addons, nor when loading in older versions of Blender. Reviewed By: dfelinto, brecht Differential Revision: https://developer.blender.org/D11812
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index ecee14d3d58..30a177a617f 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -28,12 +28,14 @@
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_brush_types.h"
+#include "DNA_collection_types.h"
#include "DNA_genfile.h"
#include "DNA_listBase.h"
#include "DNA_modifier_types.h"
#include "DNA_text_types.h"
#include "BKE_animsys.h"
+#include "BKE_collection.h"
#include "BKE_fcurve_driver.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
@@ -468,6 +470,16 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 8)) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ if (scene->master_collection != NULL) {
+ BLI_strncpy(scene->master_collection->id.name + 2,
+ BKE_SCENE_COLLECTION_NAME,
+ sizeof(scene->master_collection->id.name) - 2);
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*