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.c9
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c7
2 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 160aa157189..bb7e2d75482 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -60,6 +60,7 @@
#include "BIF_glutil.h"
#include "GPU_basic_shader.h"
+#include "GPU_compositing.h"
#include "ED_anim_api.h"
#include "ED_gpencil.h"
@@ -908,7 +909,7 @@ void ED_sequencer_special_preview_clear(void)
ImBuf *sequencer_ibuf_get(struct Main *bmain, Scene *scene, SpaceSeq *sseq, int cfra, int frame_ofs, const char *viewname)
{
- SeqRenderData context;
+ SeqRenderData context = {0};
ImBuf *ibuf;
int rectx, recty;
float render_size;
@@ -935,6 +936,12 @@ ImBuf *sequencer_ibuf_get(struct Main *bmain, Scene *scene, SpaceSeq *sseq, int
rectx, recty, proxy_size,
&context);
context.view_id = BKE_scene_multiview_view_id_get(&scene->r, viewname);
+ if (scene->r.seq_flag & R_SEQ_CAMERA_DOF) {
+ if (sseq->compositor == NULL) {
+ sseq->compositor = GPU_fx_compositor_create();
+ }
+ context.gpu_fx = sseq->compositor;
+ }
/* sequencer could start rendering, in this case we need to be sure it wouldn't be canceled
* by Esc pressed somewhere in the past
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index f1d0f23f8af..6b50d3fecdf 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -60,6 +60,8 @@
#include "IMB_imbuf.h"
+#include "GPU_compositing.h"
+
#include "sequencer_intern.h" // own include
/**************************** common state *****************************/
@@ -218,6 +220,11 @@ static void sequencer_free(SpaceLink *sl)
if (scopes->histogram_ibuf)
IMB_freeImBuf(scopes->histogram_ibuf);
+
+ if (sseq->compositor != NULL) {
+ GPU_fx_compositor_destroy(sseq->compositor);
+ sseq->compositor = NULL;
+ }
}