forked from blender/blender
main sync #3
@ -76,6 +76,7 @@
|
|||||||
#include "readfile.h"
|
#include "readfile.h"
|
||||||
|
|
||||||
#include "SEQ_channels.h"
|
#include "SEQ_channels.h"
|
||||||
|
#include "SEQ_effects.h"
|
||||||
#include "SEQ_iterator.h"
|
#include "SEQ_iterator.h"
|
||||||
#include "SEQ_retiming.h"
|
#include "SEQ_retiming.h"
|
||||||
#include "SEQ_sequencer.h"
|
#include "SEQ_sequencer.h"
|
||||||
@ -1637,6 +1638,16 @@ static bool version_fix_delete_flag(Sequence *seq, void * /*user_data*/)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool version_set_seq_single_frame_content(Sequence *seq, void * /*user_data*/)
|
||||||
|
{
|
||||||
|
if ((seq->len == 1) &&
|
||||||
|
(seq->type == SEQ_TYPE_IMAGE ||
|
||||||
|
((seq->type & SEQ_TYPE_EFFECT) && SEQ_effect_get_num_inputs(seq->type) == 0))) {
|
||||||
|
seq->flag |= SEQ_SINGLE_FRAME_CONTENT;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* Those `version_liboverride_rnacollections_*` functions mimic the old, pre-3.0 code to find
|
/* Those `version_liboverride_rnacollections_*` functions mimic the old, pre-3.0 code to find
|
||||||
* anchor and source items in the given list of modifiers, constraints etc., using only the
|
* anchor and source items in the given list of modifiers, constraints etc., using only the
|
||||||
* `subitem_local` data of the override property operation.
|
* `subitem_local` data of the override property operation.
|
||||||
@ -4027,6 +4038,14 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Use `SEQ_SINGLE_FRAME_CONTENT` flag instead of weird function to check if strip has multiple
|
||||||
|
* frames. */
|
||||||
|
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||||
|
Editing *ed = SEQ_editing_get(scene);
|
||||||
|
if (ed != nullptr) {
|
||||||
|
SEQ_for_each_callback(&ed->seqbase, version_set_seq_single_frame_content, nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
/* Keep this block, even when empty. */
|
/* Keep this block, even when empty. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1851,6 +1851,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
|
|||||||
seq_new->start = start_ofs;
|
seq_new->start = start_ofs;
|
||||||
seq_new->type = SEQ_TYPE_IMAGE;
|
seq_new->type = SEQ_TYPE_IMAGE;
|
||||||
seq_new->len = 1;
|
seq_new->len = 1;
|
||||||
|
seq->flag |= SEQ_SINGLE_FRAME_CONTENT;
|
||||||
seq_new->endofs = 1 - step;
|
seq_new->endofs = 1 - step;
|
||||||
|
|
||||||
/* New strip. */
|
/* New strip. */
|
||||||
@ -2918,6 +2919,13 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
|
|||||||
RNA_END;
|
RNA_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len == 1) {
|
||||||
|
seq->flag |= SEQ_SINGLE_FRAME_CONTENT;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
seq->flag &= ~SEQ_SINGLE_FRAME_CONTENT;
|
||||||
|
}
|
||||||
|
|
||||||
/* Reset these else we won't see all the images. */
|
/* Reset these else we won't see all the images. */
|
||||||
seq->anim_startofs = seq->anim_endofs = 0;
|
seq->anim_startofs = seq->anim_endofs = 0;
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ enum {
|
|||||||
SEQ_USE_PROXY = (1 << 15),
|
SEQ_USE_PROXY = (1 << 15),
|
||||||
SEQ_IGNORE_CHANNEL_LOCK = (1 << 16),
|
SEQ_IGNORE_CHANNEL_LOCK = (1 << 16),
|
||||||
SEQ_AUTO_PLAYBACK_RATE = (1 << 17),
|
SEQ_AUTO_PLAYBACK_RATE = (1 << 17),
|
||||||
SEQ_FLAG_UNUSED_18 = (1 << 18), /* cleared */
|
SEQ_SINGLE_FRAME_CONTENT = (1 << 18),
|
||||||
SEQ_FLAG_UNUSED_19 = (1 << 19), /* cleared */
|
SEQ_FLAG_UNUSED_19 = (1 << 19), /* cleared */
|
||||||
SEQ_FLAG_UNUSED_21 = (1 << 21), /* cleared */
|
SEQ_FLAG_UNUSED_21 = (1 << 21), /* cleared */
|
||||||
|
|
||||||
|
@ -176,6 +176,7 @@ Sequence *SEQ_add_effect_strip(Scene *scene, ListBase *seqbase, struct SeqLoadDa
|
|||||||
|
|
||||||
if (!load_data->effect.seq1) {
|
if (!load_data->effect.seq1) {
|
||||||
seq->len = 1; /* Effect is generator, set non zero length. */
|
seq->len = 1; /* Effect is generator, set non zero length. */
|
||||||
|
seq->flag |= SEQ_SINGLE_FRAME_CONTENT;
|
||||||
SEQ_time_right_handle_frame_set(scene, seq, load_data->effect.end_frame);
|
SEQ_time_right_handle_frame_set(scene, seq, load_data->effect.end_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,6 +236,10 @@ Sequence *SEQ_add_image_strip(Main *bmain, Scene *scene, ListBase *seqbase, SeqL
|
|||||||
Strip *strip = seq->strip;
|
Strip *strip = seq->strip;
|
||||||
strip->stripdata = MEM_callocN(load_data->image.len * sizeof(StripElem), "stripelem");
|
strip->stripdata = MEM_callocN(load_data->image.len * sizeof(StripElem), "stripelem");
|
||||||
|
|
||||||
|
if (seq->len == 1) {
|
||||||
|
seq->flag |= SEQ_SINGLE_FRAME_CONTENT;
|
||||||
|
}
|
||||||
|
|
||||||
/* Multiview settings. */
|
/* Multiview settings. */
|
||||||
if (load_data->use_multiview) {
|
if (load_data->use_multiview) {
|
||||||
seq->flag |= SEQ_USE_VIEWS;
|
seq->flag |= SEQ_USE_VIEWS;
|
||||||
|
@ -77,7 +77,7 @@ float seq_give_frame_index(const Scene *scene, Sequence *seq, float timeline_fra
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seq->len == 1 && seq->type == SEQ_TYPE_IMAGE) {
|
if (seq->type == SEQ_TYPE_IMAGE && SEQ_transform_single_image_check(seq)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,9 +36,7 @@ static CLG_LogRef LOG = {"seq.strip_transform"};
|
|||||||
|
|
||||||
bool SEQ_transform_single_image_check(Sequence *seq)
|
bool SEQ_transform_single_image_check(Sequence *seq)
|
||||||
{
|
{
|
||||||
return ((seq->len == 1) &&
|
return (seq->flag & SEQ_SINGLE_FRAME_CONTENT) != 0;
|
||||||
(seq->type == SEQ_TYPE_IMAGE ||
|
|
||||||
((seq->type & SEQ_TYPE_EFFECT) && SEQ_effect_get_num_inputs(seq->type) == 0)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SEQ_transform_seqbase_isolated_sel_check(ListBase *seqbase)
|
bool SEQ_transform_seqbase_isolated_sel_check(ListBase *seqbase)
|
||||||
|
Loading…
Reference in New Issue
Block a user