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:
authorRichard Antalik <richardantalik@gmail.com>2022-04-04 13:52:48 +0300
committerRichard Antalik <richardantalik@gmail.com>2022-04-04 13:56:43 +0300
commit277fa2f441f4ab2c00e7f329ba34a3466956647c (patch)
treebde615d956239337f88575dc7ce79d26f0f6cf4f /source/blender/editors/space_sequencer/sequencer_intern.h
parent5a0b4e97e67446ef3a180acb0ad03b4cbf91b356 (diff)
VSE: Add channel headers
This patch adds channel region to VSE timeline area for drawing channel headers. It is synchronizedwith timeline region. 3 basic features are implemented - channel visibility, locking and name. Channel data is stored in `SeqTimelineChannel` which can be top-level owned by `Editing`, or it is owned by meta strip to support nesting. Strip properties are completely independent and channel properties are applied on top of particular strip property, thus overriding it. Implementation is separate from channel regions in other editors. This is mainly because style and topology is quite different in VSE. But also code seems to be much more readable this way. Currently channels use functions similar to VSE timeline to draw background to provide illusion of transparency, but only for background and sfra/efra regions. Great portion of this patch is change from using strip visibility and lock status to include channel state - this is facilitated by functions `SEQ_transform_is_locked` and `SEQ_render_is_muted` Originally this included changes in D14263, but patch was split for easier review. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D13836
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_intern.h')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index 33457103ff8..194aa518cd7 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -25,9 +25,31 @@ struct View2D;
struct bContext;
struct rctf;
struct wmOperator;
+struct ScrArea;
+struct Editing;
+struct ListBase;
#define OVERLAP_ALPHA 180
+typedef struct SeqChannelDrawContext {
+ const struct bContext *C;
+ struct ScrArea *area;
+ struct ARegion *region;
+ struct ARegion *timeline_region;
+ struct View2D *v2d;
+ struct View2D *timeline_region_v2d;
+
+ struct Scene *scene;
+ struct Editing *ed;
+ struct ListBase *seqbase; /* Displayed seqbase. */
+ struct ListBase *channels; /* Displayed channels. */
+
+ float draw_offset;
+ float channel_height;
+ float frame_width;
+ float scale;
+} SeqChannelDrawContext;
+
/* sequencer_draw.c */
void draw_timeline_seq(const struct bContext *C, struct ARegion *region);
@@ -80,6 +102,12 @@ void draw_seq_strip_thumbnail(struct View2D *v2d,
float pixelx,
float pixely);
+/* sequencer_draw_channels.c */
+void draw_channels(const struct bContext *C, struct ARegion *region);
+void channel_draw_context_init(const struct bContext *C,
+ struct ARegion *region,
+ struct SeqChannelDrawContext *r_context);
+
/* sequencer_edit.c */
struct View2D;
@@ -242,6 +270,9 @@ void SEQUENCER_OT_view_zoom_ratio(struct wmOperatorType *ot);
void SEQUENCER_OT_view_selected(struct wmOperatorType *ot);
void SEQUENCER_OT_view_ghost_border(struct wmOperatorType *ot);
+/* sequencer_channels_edit.c */
+void SEQUENCER_OT_rename_channel(struct wmOperatorType *ot);
+
/* sequencer_preview.c */
void sequencer_preview_add_sound(const struct bContext *C, struct Sequence *seq);