Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenloader / intern / versioning_270.c
index db32b48c717029b98a2e2650e3c1f0715e3e2945..cb7c46d24f3ec8157a2802f2c2e5f4e1822628e0 100644 (file)
@@ -1236,12 +1236,19 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 
                        SEQ_BEGIN (scene->ed, seq)
                        {
-                               if (seq->type == SEQ_TYPE_TEXT) {
-                                       TextVars *data = seq->effectdata;
-                                       if (data->color[3] == 0.0f) {
-                                               copy_v4_fl(data->color, 1.0f);
-                                               data->shadow_color[3] = 1.0f;
-                                       }
+                               if (seq->type != SEQ_TYPE_TEXT) {
+                                       continue;
+                               }
+
+                               if (seq->effectdata == NULL) {
+                                       struct SeqEffectHandle effect_handle = BKE_sequence_get_effect(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;
                                }
                        }
                        SEQ_END