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_270.c')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c79
1 files changed, 43 insertions, 36 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 1d46c0d5790..6492f0d1f69 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -425,6 +425,45 @@ static void do_version_bbone_easing_fcurve_fix(ID *UNUSED(id),
}
}
+static bool seq_update_proxy_cb(Sequence *seq, void *UNUSED(user_data))
+{
+ seq->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Stereo Display 3d Format");
+
+#define SEQ_USE_PROXY_CUSTOM_DIR (1 << 19)
+#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21)
+ if (seq->strip && seq->strip->proxy && !seq->strip->proxy->storage) {
+ if (seq->flag & SEQ_USE_PROXY_CUSTOM_DIR) {
+ seq->strip->proxy->storage = SEQ_STORAGE_PROXY_CUSTOM_DIR;
+ }
+ if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
+ seq->strip->proxy->storage = SEQ_STORAGE_PROXY_CUSTOM_FILE;
+ }
+ }
+#undef SEQ_USE_PROXY_CUSTOM_DIR
+#undef SEQ_USE_PROXY_CUSTOM_FILE
+ return true;
+}
+
+static bool seq_update_effectdata_cb(Sequence *seq, void *UNUSED(user_data))
+{
+
+ if (seq->type != SEQ_TYPE_TEXT) {
+ return true;
+ }
+
+ if (seq->effectdata == NULL) {
+ struct SeqEffectHandle effect_handle = SEQ_effect_handle_get(seq);
+ effect_handle.init(seq);
+ }
+
+ TextVars *data = seq->effectdata;
+ if (data->color[3] == 0.0f) {
+ copy_v4_fl(data->color, 1.0f);
+ data->shadow_color[3] = 1.0f;
+ }
+ return true;
+}
+
/* NOLINTNEXTLINE: readability-function-size */
void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
{
@@ -908,8 +947,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
Image *ima;
for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
- Sequence *seq;
-
BKE_scene_add_render_view(scene, STEREO_LEFT_NAME);
srv = scene->r.views.first;
BLI_strncpy(srv->suffix, STEREO_LEFT_SUFFIX, sizeof(srv->suffix));
@@ -918,23 +955,9 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
srv = scene->r.views.last;
BLI_strncpy(srv->suffix, STEREO_RIGHT_SUFFIX, sizeof(srv->suffix));
- SEQ_ALL_BEGIN (scene->ed, seq) {
- seq->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Stereo Display 3d Format");
-
-#define SEQ_USE_PROXY_CUSTOM_DIR (1 << 19)
-#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21)
- if (seq->strip && seq->strip->proxy && !seq->strip->proxy->storage) {
- if (seq->flag & SEQ_USE_PROXY_CUSTOM_DIR) {
- seq->strip->proxy->storage = SEQ_STORAGE_PROXY_CUSTOM_DIR;
- }
- if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
- seq->strip->proxy->storage = SEQ_STORAGE_PROXY_CUSTOM_FILE;
- }
- }
-#undef SEQ_USE_PROXY_CUSTOM_DIR
-#undef SEQ_USE_PROXY_CUSTOM_FILE
+ if (scene->ed) {
+ SEQ_for_each_callback(&scene->ed->seqbase, seq_update_proxy_cb, NULL);
}
- SEQ_ALL_END;
}
for (screen = bmain->screens.first; screen; screen = screen->id.next) {
@@ -1215,25 +1238,9 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
- Sequence *seq;
-
- SEQ_ALL_BEGIN (scene->ed, seq) {
- if (seq->type != SEQ_TYPE_TEXT) {
- continue;
- }
-
- if (seq->effectdata == NULL) {
- struct SeqEffectHandle effect_handle = SEQ_effect_handle_get(seq);
- effect_handle.init(seq);
- }
-
- TextVars *data = seq->effectdata;
- if (data->color[3] == 0.0f) {
- copy_v4_fl(data->color, 1.0f);
- data->shadow_color[3] = 1.0f;
- }
+ if (scene->ed) {
+ SEQ_for_each_callback(&scene->ed->seqbase, seq_update_effectdata_cb, NULL);
}
- SEQ_ALL_END;
}
/* Adding "Properties" region to DopeSheet */