Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 23 Jul 2018 15:52:52 +0000 (17:52 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 23 Jul 2018 15:52:52 +0000 (17:52 +0200)
Note: Moved doversion of VSE strips uniquename to 2.8 versionning area,
and raised accordingly current file subversion, since that bug also
affected previous 2.8 .blend files...

Conflicts:
source/blender/blenkernel/BKE_blender_version.h

source/blender/blenkernel/BKE_blender_version.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/intern/sequencer.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_280.c
source/blender/editors/space_sequencer/sequencer_edit.c

index 8707fe3e11b1c64604cb605dc58f64d6a7ae8e99..79ae904c73d4bf5ff75b876217cefe222c2657aa 100644 (file)
@@ -28,7 +28,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         280
-#define BLENDER_SUBVERSION      20
+#define BLENDER_SUBVERSION      21
 /* Several breakages with 280, e.g. collections vs layers */
 #define BLENDER_MINVERSION      280
 #define BLENDER_MINSUBVERSION   0
index 51f61c8352ce76bf35fe854fba33b04193a48e2b..00fd4ded8c62b235024bfcdfb681c9ab34497dcc 100644 (file)
@@ -395,7 +395,7 @@ typedef struct SeqLoadInfo {
 
 
 /* seq_dupli' flags */
-#define SEQ_DUPE_UNIQUE_NAME    (1 << 0)
+#define SEQ_DUPE_UNIQUE_NAME    (1 << 0)  /* WARNING: does NOT work when duplicating Meta strips! */
 #define SEQ_DUPE_CONTEXT        (1 << 1)
 #define SEQ_DUPE_ANIM           (1 << 2)
 #define SEQ_DUPE_ALL            (1 << 3) /* otherwise only selected are copied */
index d857db7e27673a6ce043e75c471bc5cca5ea101d..b5b4ec5cd41d5d658fccafc1e223e81ba1a14ccc 100644 (file)
@@ -5530,6 +5530,7 @@ static Sequence *seq_dupli(const Scene *scene_src, Scene *scene_dst, Sequence *s
 
        if (scene_src == scene_dst) {
                if (dupe_flag & SEQ_DUPE_UNIQUE_NAME) {
+                       /* TODO this is broken in case of Meta strips recursive duplication... Not trivial to fix. */
                        BKE_sequence_base_unique_name_recursive(&scene_dst->ed->seqbase, seqn);
                }
 
index 973591c49daec6abe4faba313264e7a77fe4f57d..4b628bf816a4cb79c82e032b5f11b77e823c68bb 100644 (file)
@@ -545,20 +545,6 @@ static void do_version_constraints_radians_degrees_250(ListBase *lb)
        }
 }
 
-/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already */
-static void do_versions_seq_unique_name_all_strips(Scene *sce, ListBase *seqbasep)
-{
-       Sequence * seq = seqbasep->first;
-
-       while (seq) {
-               BKE_sequence_base_unique_name_recursive(&sce->ed->seqbase, seq);
-               if (seq->seqbase.first) {
-                       do_versions_seq_unique_name_all_strips(sce, &seq->seqbase);
-               }
-               seq = seq->next;
-       }
-}
-
 static void do_version_bone_roll_256(Bone *bone)
 {
        Bone *child;
@@ -1029,10 +1015,6 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
                                if (sce->r.frame_step == 0)
                                        sce->r.frame_step = 1;
 
-                               if (sce->ed && sce->ed->seqbase.first) {
-                                       do_versions_seq_unique_name_all_strips(sce, &sce->ed->seqbase);
-                               }
-
                                sce = sce->id.next;
                        }
                }
index 6ac7c7199528bf1aeb459c392af4147202e82bc6..79ae95e96e4b7aa48b02198904fd541052acc618 100644 (file)
@@ -753,6 +753,18 @@ void do_versions_after_linking_280(Main *bmain)
 #endif
 }
 
+/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already.
+ *       But in 2.79 another case generating non-unique names was discovered (see T55668, involving Meta strips)... */
+static void do_versions_seq_unique_name_all_strips(Scene *sce, ListBase *seqbasep)
+{
+       for (Sequence *seq = seqbasep->first; seq != NULL; seq = seq->next) {
+               BKE_sequence_base_unique_name_recursive(&sce->ed->seqbase, seq);
+               if (seq->seqbase.first != NULL) {
+                       do_versions_seq_unique_name_all_strips(sce, &seq->seqbase);
+               }
+       }
+}
+
 void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 {
        bool use_collection_compat_28 = true;
@@ -1200,6 +1212,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 
                                scene->eevee.flag =
                                        SCE_EEVEE_VOLUMETRIC_LIGHTS |
+                                       SCE_EEVEE_VOLUMETRIC_COLORED |
                                        SCE_EEVEE_GTAO_BENT_NORMALS |
                                        SCE_EEVEE_GTAO_BOUNCE |
                                        SCE_EEVEE_TAA_REPROJECTION |
@@ -1257,6 +1270,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
                                EEVEE_GET_BOOL(props, volumetric_enable, SCE_EEVEE_VOLUMETRIC_ENABLED);
                                EEVEE_GET_BOOL(props, volumetric_lights, SCE_EEVEE_VOLUMETRIC_LIGHTS);
                                EEVEE_GET_BOOL(props, volumetric_shadows, SCE_EEVEE_VOLUMETRIC_SHADOWS);
+                               EEVEE_GET_BOOL(props, volumetric_colored_transmittance, SCE_EEVEE_VOLUMETRIC_COLORED);
                                EEVEE_GET_BOOL(props, gtao_enable, SCE_EEVEE_GTAO_ENABLED);
                                EEVEE_GET_BOOL(props, gtao_use_bent_normals, SCE_EEVEE_GTAO_BENT_NORMALS);
                                EEVEE_GET_BOOL(props, gtao_bounce, SCE_EEVEE_GTAO_BOUNCE);
@@ -1522,7 +1536,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 
        }
 
-       {
+       if (!MAIN_VERSION_ATLEAST(bmain, 280, 21)) {
+               for (Scene *sce = bmain->scene.first; sce != NULL; sce = sce->id.next) {
+                       if (sce->ed != NULL && sce->ed->seqbase.first != NULL) {
+                               do_versions_seq_unique_name_all_strips(sce, &sce->ed->seqbase);
+                       }
+               }
+
                if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "texture_paint_mode_opacity")) {
                        for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
                                for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
@@ -1620,4 +1640,5 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
                        }
                }
        }
+
 }
index cefc6cdd814f4c1bd8da1adf45e258afff3ed403..199ff06cc8b05808a815adbe7c4090bfadd14920 100644 (file)
@@ -739,7 +739,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe)
 
        if (!skip_dup) {
                /* Duplicate AFTER the first change */
-               seqn = BKE_sequence_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM);
+               seqn = BKE_sequence_dupli_recursive(scene, scene, seq, SEQ_DUPE_ANIM);
        }
 
        if (seqn) {
@@ -848,7 +848,7 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe)
 
        if (!skip_dup) {
                /* Duplicate AFTER the first change */
-               seqn = BKE_sequence_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME | SEQ_DUPE_ANIM);
+               seqn = BKE_sequence_dupli_recursive(scene, scene, seq, SEQ_DUPE_ANIM);
        }
 
        if (seqn) {
@@ -2091,6 +2091,7 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
 
                SEQP_BEGIN (ed, seq)
                {
+                       BKE_sequence_base_unique_name_recursive(&ed->seqbase, seq);
                        if (seq->seq1 || seq->seq2 || seq->seq3) {
                                BKE_sequence_calc(scene, seq);
                        }