Merge branch 'master' into blender2.8

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
This commit is contained in:
2018-07-23 17:52:52 +02:00
6 changed files with 28 additions and 23 deletions

View 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

View 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 */

View 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);
}

View 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;
}
}

View 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)
}
}
}
}

View 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);
}