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:
authorRichard Antalik <richardantalik@gmail.com>2019-05-23 21:50:15 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-05-23 21:50:15 +0300
commit1fd7b380f4cf8a0489b405de2819f228a4da5ea2 (patch)
treea829fdf55a649e1c1d6ebca9a6006ad08e415755 /source/blender/blenkernel/intern/sequencer.c
parenta3bc8690387b53234234d1c8f993fa04974d3034 (diff)
VSE: remove lazy loading for strip crop and transform
Lazy loading prevented showing values in UI. Now we just gray them out if not used.
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 92f951ec637..29e9776407d 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -5352,6 +5352,15 @@ static void seq_load_apply(Main *bmain, Scene *scene, Sequence *seq, SeqLoadInfo
}
}
+static Strip *seq_strip_alloc()
+{
+ Strip *strip = MEM_callocN(sizeof(Strip), "strip");
+ strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
+ strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
+
+ return strip;
+}
+
Sequence *BKE_sequence_alloc(ListBase *lb, int cfra, int machine)
{
Sequence *seq;
@@ -5460,7 +5469,7 @@ Sequence *BKE_sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoad
seq->blend_mode = SEQ_TYPE_ALPHAOVER;
/* basic defaults */
- seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
+ seq->strip = strip = seq_strip_alloc();
seq->len = seq_load->len ? seq_load->len : 1;
strip->us = 1;
@@ -5515,7 +5524,7 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad
BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq);
/* basic defaults */
- seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
+ seq->strip = strip = seq_strip_alloc();
/* We add a very small negative offset here, because
* ceil(132.0) == 133.0, not nice with videos, see T47135. */
seq->len = (int)ceil((double)info.length * FPS - 1e-4);
@@ -5647,7 +5656,7 @@ Sequence *BKE_sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoad
}
/* basic defaults */
- seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
+ seq->strip = strip = seq_strip_alloc();
seq->len = IMB_anim_get_duration(anim_arr[0], IMB_TC_RECORD_RUN);
strip->us = 1;