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:
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c15
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c6
2 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 995e980aba0..4b76f1432ee 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -50,12 +50,14 @@
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
+#include "GPU_batch_presets.h"
#include "GPU_framebuffer.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "GPU_vertex_buffer.h"
+#include "GPU_viewport.h"
#include "ED_anim_api.h"
#include "ED_gpencil.h"
@@ -1537,7 +1539,7 @@ static void sequencer_preview_clear(void)
float col[3];
UI_GetThemeColor3fv(TH_SEQ_PREVIEW, col);
- GPU_clear_color(col[0], col[1], col[2], 0.0);
+ GPU_clear_color(col[0], col[1], col[2], 1.0);
GPU_clear(GPU_COLOR_BIT);
}
@@ -1775,6 +1777,14 @@ void sequencer_draw_preview(const bContext *C,
return;
}
+ /* Setup offscreen buffers. */
+ GPUViewport *viewport = WM_draw_region_get_viewport(region);
+
+ GPUFrameBuffer *framebuffer_overlay = GPU_viewport_framebuffer_overlay_get(viewport);
+ GPU_framebuffer_bind_no_srgb(framebuffer_overlay);
+ GPU_batch_presets_reset();
+ GPU_depth_test(false);
+
if (sseq->render_size == SEQ_PROXY_RENDER_SIZE_NONE) {
sequencer_preview_clear();
return;
@@ -1798,6 +1808,9 @@ void sequencer_draw_preview(const bContext *C,
ibuf = sequencer_ibuf_get(
bmain, depsgraph, scene, sseq, cfra, frame_ofs, names[sseq->multiview_eye]);
+ /* sequencer_ibuf_get can call GPU_framebuffer_bind. So disable srgb framebuffer again. */
+ GPU_framebuffer_bind_no_srgb(framebuffer_overlay);
+
if (ibuf) {
scope = sequencer_get_scope(scene, sseq, ibuf, draw_backdrop);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index b2d0362602e..bab099a77c1 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2751,6 +2751,8 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
seq = ed->seqbasep->first; /* Poll checks this is valid. */
+ BKE_sequencer_prefetch_stop(scene);
+
while (seq) {
if ((seq->flag & SELECT) && (seq->type == SEQ_TYPE_IMAGE) && (seq->len > 1)) {
Sequence *seq_next;
@@ -2946,6 +2948,8 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ BKE_sequencer_prefetch_stop(scene);
+
/* Remove all selected from main list, and put in meta. */
seqm = BKE_sequence_alloc(ed->seqbasep, 1, 1, SEQ_TYPE_META); /* Channel number set later. */
@@ -3031,6 +3035,8 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
+ BKE_sequencer_prefetch_stop(scene);
+
for (seq = last_seq->seqbase.first; seq != NULL; seq = seq->next) {
BKE_sequence_invalidate_cache_composite(scene, seq);
}