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:
authorJoseph Eagar <joeedh@gmail.com>2022-03-30 21:32:28 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-03-30 21:32:28 +0300
commit2e3fdeed94f32e100921e610c7c99e5d1a5bf727 (patch)
tree073046140af7353737b70601f176cd0148510d0f /source/blender/blenloader
parent4e794686a934cc5245bee652246ac3af2bd72cac (diff)
parent84fde382e43cff6407bfa3587fec9bd570cf9123 (diff)
Merge remote-tracking branch 'origin/master' into temp-sculpt-colors
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c45
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c2
2 files changed, 35 insertions, 12 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 2f6bec4061a..c148825c32c 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -2485,17 +2485,27 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- /**
- * Versioning code until next subversion bump goes here.
- *
- * \note Be sure to check when bumping the version:
- * - "versioning_userdef.c", #blo_do_versions_userdef
- * - "versioning_userdef.c", #do_versions_theme
- *
- * \note Keep this message at the bottom of the function.
- */
- {
- /* Keep this block, even when empty. */
+ if (!MAIN_VERSION_ATLEAST(bmain, 302, 7)) {
+ /* Generate 'system' liboverrides IDs.
+ * NOTE: This is a fairly rough process, based on very basic heuristics. Should be enough for a
+ * do_version code though, this is a new optional feature, not a critical conversion. */
+ ID *id;
+ FOREACH_MAIN_ID_BEGIN (bmain, id) {
+ if (!ID_IS_OVERRIDE_LIBRARY_REAL(id) || ID_IS_LINKED(id)) {
+ /* Ignore non-real liboverrides, and linked ones. */
+ continue;
+ }
+ if (GS(id->name) == ID_OB) {
+ /* Never 'lock' an object into a system override for now. */
+ continue;
+ }
+ if (BKE_lib_override_library_is_user_edited(id)) {
+ /* Do not 'lock' an ID already edited by the user. */
+ continue;
+ }
+ id->override_library->flag |= IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED;
+ }
+ FOREACH_MAIN_ID_END;
/* Initialize brush curves sculpt settings. */
LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) {
@@ -2526,4 +2536,17 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
+
+ /**
+ * Versioning code until next subversion bump goes here.
+ *
+ * \note Be sure to check when bumping the version:
+ * - "versioning_userdef.c", #blo_do_versions_userdef
+ * - "versioning_userdef.c", #do_versions_theme
+ *
+ * \note Keep this message at the bottom of the function.
+ */
+ {
+ /* Keep this block, even when empty. */
+ }
}
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 16297149cc3..4c27b8b9016 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -1254,7 +1254,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
}
cam = cam->id.next;
}
- /* Force oops draw if depgraph was set. */
+ /* Force oops draw if depsgraph was set. */
/* Set time line var. */
/* softbody init new vars */