[Bf-blender-cvs] [57c79e07ce0] soc-2021-vse-strip-thumbnails: Fix conflicts in space_sequencer.c
Aditya Y Jeppu
noreply at git.blender.org
Sat Jul 31 18:09:45 CEST 2021
Commit: 57c79e07ce063b7256091a7590bf33bb2488f756
Author: Aditya Y Jeppu
Date: Fri Jul 30 19:49:29 2021 +0530
Branches: soc-2021-vse-strip-thumbnails
https://developer.blender.org/rB57c79e07ce063b7256091a7590bf33bb2488f756
Fix conflicts in space_sequencer.c
===================================================================
M source/blender/editors/space_sequencer/sequencer_draw.c
M source/blender/editors/space_sequencer/space_sequencer.c
M source/blender/makesdna/DNA_space_types.h
M source/blender/sequencer/intern/render.c
===================================================================
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 372c7a24336..8628cf0b181 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1256,12 +1256,10 @@ static void sequencer_thumbnail_get_job(const bContext *C,
WM_jobs_callbacks(wm_job, thumbnail_startjob, NULL, NULL, thumbnail_endjob);
}
else {
+ /* Free the hash input */
BLI_ghash_free(seqs, NULL, thumbnail_hash_data_free);
- // Workaround for now
}
- // TODO(AYJ) : add the new data to the existing thread if new information has come in (calls this
- // function twice)
if (!WM_jobs_is_running(wm_job)) {
G.is_break = false;
WM_jobs_start(CTX_wm_manager(C), wm_job);
@@ -1278,11 +1276,11 @@ static void thumbnail_call_for_job(const bContext *C, Editing *ed, View2D *v2d,
SpaceSeq *sseq = CTX_wm_space_seq(C);
/* Set the data for thumbnail caching job */
- static rctf check_view = {0, 0, 0, 0};
GHash *thumb_data_hash;
// leftover is set to true if missing image in strip. false when normal call to all strips done
- if (!BLI_rctf_compare(&check_view, &v2d->cur, 0.1) || leftover) {
+ if (v2d->cur.xmax != sseq->check_view_area.xmax || v2d->cur.ymax != sseq->check_view_area.ymax ||
+ leftover) {
thumb_data_hash = BLI_ghash_ptr_new("seq_duplicates_and_origs");
LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) {
@@ -1297,7 +1295,7 @@ static void thumbnail_call_for_job(const bContext *C, Editing *ed, View2D *v2d,
context.view_id = BKE_scene_multiview_view_id_get(&scene->r, STEREO_LEFT_NAME);
context.use_proxies = false;
sequencer_thumbnail_get_job(C, v2d, context, thumb_data_hash);
- check_view = v2d->cur;
+ sseq->check_view_area = v2d->cur;
}
}
@@ -2319,8 +2317,6 @@ static void draw_seq_backdrop(View2D *v2d)
static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region)
{
- struct Main *bmain = CTX_data_main(C);
- struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
Scene *scene = CTX_data_scene(C);
View2D *v2d = ®ion->v2d;
SpaceSeq *sseq = CTX_wm_space_seq(C);
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 6de95f0995a..c6e0afc997a 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -101,7 +101,8 @@ static SpaceLink *sequencer_create(const ScrArea *UNUSED(area), const Scene *sce
sseq->flag = SEQ_SHOW_GPENCIL | SEQ_USE_ALPHA | SEQ_SHOW_MARKERS | SEQ_SHOW_FCURVES |
SEQ_ZOOM_TO_FIT | SEQ_SHOW_STRIP_OVERLAY | SEQ_SHOW_STRIP_NAME |
SEQ_SHOW_STRIP_SOURCE | SEQ_SHOW_STRIP_DURATION | SEQ_SHOW_GRID;
-
+ struct rctf temp = {0, 0, 0, 0};
+ sseq->check_view_area = temp;
/* Tool header. */
region = MEM_callocN(sizeof(ARegion), "tool header for sequencer");
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 7290647dbc6..e41cd4d9e00 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -616,6 +616,10 @@ typedef struct SpaceSeq {
/** Multiview current eye - for internal use. */
char multiview_eye;
char _pad2[7];
+
+ /** Required for Thumbnail caching job call condition */
+ struct rctf check_view_area;
+
} SpaceSeq;
/* SpaceSeq.mainb */
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index b6e17da51b3..6fe04456f2d 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -2109,8 +2109,8 @@ void SEQ_render_thumbnails(SeqRenderData *context,
SeqRenderState state;
seq_render_state_init(&state);
- start_frame = start_frame - 3 * frame_step;
- float upper_limit = view_area->xmax + 3 * frame_step;
+ start_frame = start_frame - 5 * frame_step;
+ float upper_limit = view_area->xmax + 5 * frame_step;
while (start_frame < upper_limit) {
ibuf = seq_cache_get(context, seq_orig, roundf(start_frame), SEQ_CACHE_STORE_THUMBNAIL);
if (ibuf) {
More information about the Bf-blender-cvs
mailing list