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:
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 9d65488e8d4..2598c53a5e0 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -444,7 +444,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
Collection *collection = BKE_collection_add(bmain, collection_master, name);
collection->id.lib = scene->id.lib;
- if (collection->id.lib != NULL) {
+ if (ID_IS_LINKED(collection)) {
collection->id.tag |= LIB_TAG_INDIRECT;
}
collections[layer] = collection;
@@ -574,10 +574,10 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene)
static void do_version_collection_propagate_lib_to_children(Collection *collection)
{
- if (collection->id.lib != NULL) {
+ if (ID_IS_LINKED(collection)) {
for (CollectionChild *collection_child = collection->children.first; collection_child != NULL;
collection_child = collection_child->next) {
- if (collection_child->collection->id.lib == NULL) {
+ if (!ID_IS_LINKED(collection_child->collection)) {
collection_child->collection->id.lib = collection->id.lib;
}
do_version_collection_propagate_lib_to_children(collection_child->collection);
@@ -1772,6 +1772,16 @@ static void do_versions_seq_set_cache_defaults(Editing *ed)
ed->recycle_max_cost = 10.0f;
}
+static bool seq_update_flags_cb(Sequence *seq, void *UNUSED(user_data))
+{
+ seq->flag &= ~(SEQ_FLAG_UNUSED_6 | SEQ_FLAG_UNUSED_18 | SEQ_FLAG_UNUSED_19 | SEQ_FLAG_UNUSED_21);
+ if (seq->type == SEQ_TYPE_SPEED) {
+ SpeedControlVars *s = (SpeedControlVars *)seq->effectdata;
+ s->flags &= ~(SEQ_SPEED_UNUSED_1);
+ }
+ return true;
+}
+
/* NOLINTNEXTLINE: readability-function-size */
void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
@@ -3447,16 +3457,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
if (scene->ed) {
- Sequence *seq;
- SEQ_ALL_BEGIN (scene->ed, seq) {
- seq->flag &= ~(SEQ_FLAG_UNUSED_6 | SEQ_FLAG_UNUSED_18 | SEQ_FLAG_UNUSED_19 |
- SEQ_FLAG_UNUSED_21);
- if (seq->type == SEQ_TYPE_SPEED) {
- SpeedControlVars *s = (SpeedControlVars *)seq->effectdata;
- s->flags &= ~(SEQ_SPEED_UNUSED_1);
- }
- }
- SEQ_ALL_END;
+ SEQ_for_each_callback(&scene->ed->seqbase, seq_update_flags_cb, NULL);
}
}