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>2022-05-18 22:26:47 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-05-18 22:26:47 +0300
commit8ca9ce09865e6a617d6c2f78f3483ba1fd5d6aef (patch)
tree371395186f59292cf0d7b94a055da690696336ef /source/blender/sequencer/intern/render.c
parent47dbdf8dd5744bc61f2e16f8d5c5eb4203ce0c48 (diff)
VSE: Remove still frame offsets
To clarify term still frame: This is portion of strip that displays static image. This area can exist before or after strip movie content. Still frames were implemented as strip property, but this was never displayed in panel. Only way to set still frames was to drag strip handle with mouse or using python API. This would set either `seq->*still` or `seq->*ofs` where * stands for `start` or `end`. When strip had offset, it can't have still frames and vice versa, but this had to be enforced in RNA functions and everywhere in code where these fields are set directly. Strip can not have negative offset or negative number of still frames. This is not very practical approach and still frames can be simply implemented as applying negative offset. Merging these offsets would simplify offset calculations for example in D14962 and could make it easier to also deprecate usage `seq->*disp` and necessity to call update functions to recalculate strip boundaries. For users only functional change is ability to set negative strip offset using property in side panel. Reviewed By: sergey Differential Revision: https://developer.blender.org/D14976
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r--source/blender/sequencer/intern/render.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index 1b9e89a35d5..b0898be3765 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -2088,7 +2088,8 @@ void SEQ_render_thumbnails(const SeqRenderData *context,
/* Adding the hold offset value (seq->anim_startofs) to the start frame. Position of image not
* affected, but frame loaded affected. */
- float upper_thumb_bound = (seq->endstill) ? (seq->start + seq->len) : seq->enddisp;
+ float upper_thumb_bound = SEQ_time_has_right_still_frames(seq) ? (seq->start + seq->len) :
+ seq->enddisp;
upper_thumb_bound = (upper_thumb_bound > view_area->xmax) ? view_area->xmax + frame_step :
upper_thumb_bound;
@@ -2121,7 +2122,9 @@ void SEQ_render_thumbnails(const SeqRenderData *context,
int SEQ_render_thumbnails_guaranteed_set_frame_step_get(const Sequence *seq)
{
- const int content_len = (seq->enddisp - seq->startdisp - seq->startstill - seq->endstill);
+ const int content_start = max_ii(seq->startdisp, seq->start);
+ const int content_end = min_ii(seq->enddisp, seq->start + seq->len);
+ const int content_len = content_end - content_start;
/* Arbitrary, but due to performance reasons should be as low as possible. */
const int thumbnails_base_set_count = min_ii(content_len / 100, 30);