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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-24 14:19:26 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-27 14:21:21 +0300
commit9b42b3e11462e96bf24970971ab181122c6b33df (patch)
tree07eb7bf0d3b0c8d9c428a7f080709a8c286c379c /source/blender/blenkernel
parent37fc23dd9e7738de7187e889f058cda845544ffb (diff)
Sequencer: Add option to render OpenGL preview with DoF
The title says it all actually, controlled with DoF check box next to textured solid check box. Thanks Campbell for review!
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h3
-rw-r--r--source/blender/blenkernel/intern/sequencer.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 66325cee98e..6c9dc12b44f 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -421,13 +421,14 @@ struct Sequence *BKE_sequencer_add_sound_strip(struct bContext *C, ListBase *seq
struct Sequence *BKE_sequencer_add_movie_strip(struct bContext *C, ListBase *seqbasep, struct SeqLoadInfo *seq_load);
/* view3d draw callback, run when not in background view */
-/* NOTE: Keep in sync with V3D_OFS_* flags. */
+/* NOTE: Keep in sync with V3D_OFSDRAW_* flags. */
enum {
SEQ_OFSDRAW_NONE = (0),
SEQ_OFSDRAW_USE_BACKGROUND = (1 << 0),
SEQ_OFSDRAW_USE_FULL_SAMPLE = (1 << 1),
SEQ_OFSDRAW_USE_GPENCIL = (1 << 2),
SEQ_OFSDRAW_USE_SOLID_TEX = (1 << 2),
+ SEQ_OFSDRAW_USE_CAMERA_DOF = (1 << 3),
};
typedef struct ImBuf *(*SequencerDrawView)(
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 592091b057f..9e8e202c2bc 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3305,6 +3305,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
draw_flags |= (use_background) ? SEQ_OFSDRAW_USE_BACKGROUND : 0;
draw_flags |= (context->gpu_full_samples) ? SEQ_OFSDRAW_USE_FULL_SAMPLE : 0;
draw_flags |= (context->scene->r.seq_flag & R_SEQ_SOLID_TEX) ? SEQ_OFSDRAW_USE_SOLID_TEX : 0;
+ draw_flags |= (context->scene->r.seq_flag & R_SEQ_CAMERA_DOF) ? SEQ_OFSDRAW_USE_CAMERA_DOF : 0;
/* for old scene this can be uninitialized,
* should probably be added to do_versions at some point if the functionality stays */