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 13:43:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-27 14:11:56 +0300
commit37fc23dd9e7738de7187e889f058cda845544ffb (patch)
treeb1423676fcc8f2cc07fdeb8125152e4d7d105b6a /source/blender/blenkernel/BKE_sequencer.h
parentff9cf0664529db88bd2ea6e13dde6f002054c745 (diff)
Refactor view3d offscreen drawing to avoid having multiple boolean arguments
This is fully unreadable to have lots of boolean arguments scattered across the whole argument list. What does `false, true, true` mean in terms of behavior? Replace those with bitfield which has advantage of having more human readable meaning.
Diffstat (limited to 'source/blender/blenkernel/BKE_sequencer.h')
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 657e99f05d1..66325cee98e 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -421,11 +421,20 @@ 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. */
+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),
+};
+
typedef struct ImBuf *(*SequencerDrawView)(
- struct Scene *, struct Object *, int, int,
- unsigned int, int, bool, bool, bool,
- int, int, bool, const char *,
- struct GPUFX *, struct GPUOffScreen *, char[256]);
+ struct Scene *scene, struct Object *camera, int width, int height,
+ unsigned int flag, unsigned int draw_flags, int drawtype, int alpha_mode,
+ int samples, const char *viewname,
+ struct GPUFX *fx, struct GPUOffScreen *ofs, char err_out[256]);
extern SequencerDrawView sequencer_view3d_cb;
/* copy/paste */