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>2021-10-18 23:20:25 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-10-18 23:25:36 +0300
commit06356115b71fb0668b0b67735f92ba6660434a96 (patch)
treeba4f2f705510adcfe4f4916996e0d5d74b83cbc0 /source/blender/editors/space_sequencer/sequencer_thumbnails.c
parent5f59bf00444bf310d0ad0dd20039839912af5122 (diff)
VSE: Don't draw thumbnails while rendering
During rendering VSE cache is invalidated, so thumbnails would be removed and thumbnail job would constantly restart. Even if thumbnails would be preserved, resources should be dedicated for rendering job.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_thumbnails.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_thumbnails.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_thumbnails.c b/source/blender/editors/space_sequencer/sequencer_thumbnails.c
index 0ea952d0999..557c233744e 100644
--- a/source/blender/editors/space_sequencer/sequencer_thumbnails.c
+++ b/source/blender/editors/space_sequencer/sequencer_thumbnails.c
@@ -291,20 +291,26 @@ static void sequencer_thumbnail_start_job_if_necessary(const bContext *C,
return;
}
- /* `thumbnail_is_missing` should be set to true if missing image in strip. False when normal call
- * to all strips done. */
- if (v2d->cur.xmax != sseq->runtime.last_thumbnail_area.xmax ||
- v2d->cur.ymax != sseq->runtime.last_thumbnail_area.ymax || thumbnail_is_missing) {
+ /* During rendering, cache is wiped, it doesn't make sense to render thumbnails. */
+ if (G.is_rendering) {
+ return;
+ }
- /* Stop the job first as view has changed. Pointless to continue old job. */
- if (v2d->cur.xmax != sseq->runtime.last_thumbnail_area.xmax ||
- v2d->cur.ymax != sseq->runtime.last_thumbnail_area.ymax) {
- WM_jobs_stop(CTX_wm_manager(C), NULL, thumbnail_start_job);
- }
+ /* Job start requested, but over area which has been processed. Unless `thumbnail_is_missing` is
+ * true, ignore this request as all images are in view. */
+ if (v2d->cur.xmax == sseq->runtime.last_thumbnail_area.xmax &&
+ v2d->cur.ymax == sseq->runtime.last_thumbnail_area.ymax && !thumbnail_is_missing) {
+ return;
+ }
- sequencer_thumbnail_init_job(C, v2d, ed);
- sseq->runtime.last_thumbnail_area = v2d->cur;
+ /* Stop the job first as view has changed. Pointless to continue old job. */
+ if (v2d->cur.xmax != sseq->runtime.last_thumbnail_area.xmax ||
+ v2d->cur.ymax != sseq->runtime.last_thumbnail_area.ymax) {
+ WM_jobs_stop(CTX_wm_manager(C), NULL, thumbnail_start_job);
}
+
+ sequencer_thumbnail_init_job(C, v2d, ed);
+ sseq->runtime.last_thumbnail_area = v2d->cur;
}
void last_displayed_thumbnails_list_free(void *val)