Blender V4.3
sequencer_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "BLI_map.hh"
12#include "BLI_span.hh"
13#include "BLI_utility_mixins.hh"
14#include "BLI_vector.hh"
15#include "BLI_vector_set.hh"
16
17#include "DNA_sequence_types.h"
18
19#include "RNA_access.hh"
20
21#include "GPU_immediate.hh"
22#include "GPU_viewport.hh"
23
24#include "ED_sequencer.hh"
25
26#include "sequencer_scopes.hh"
27
28/* Internal exports only. */
29
30class SeqQuadsBatch;
31struct ARegion;
32struct ARegionType;
33struct Scene;
34struct SeqRetimingKey;
35struct Sequence;
36struct SpaceSeq;
37struct StripElem;
38struct View2D;
39struct bContext;
40struct rctf;
41struct wmKeyConfig;
42struct wmOperator;
43struct wmOperatorType;
44struct ScrArea;
45struct Editing;
46struct ListBase;
47
48#define DEFAULT_IMG_STRIP_LENGTH 25 /* XXX arbitrary but ok for now. */
49
51
52class StripsDrawBatch;
53
63
64} // namespace blender::ed::seq
65
84
87 const FCurve *curve = nullptr; /* Curve for overlay, if any (blend factor or volume). */
88
89 /* Strip boundary in timeline space. Content start/end is clamped by left/right handle. */
91 float left_handle, right_handle; /* Position in frames. */
92 float strip_content_top; /* Position in timeline space without content and text overlay. */
93 float handle_width; /* Width of strip handle in frames. */
95
99 bool strip_is_too_small; /* Shorthand for (!can_draw_text_overlay && !can_draw_strip_content). */
101 bool is_single_image; /* Strip has single frame of content. */
107};
108
124
125/* `sequencer_timeline_draw.cc` */
126
127void draw_timeline_seq(const bContext *C, ARegion *region);
128void draw_timeline_seq_display(const bContext *C, ARegion *region);
129
130/* `sequencer_preview_draw.cc` */
131
132void sequencer_draw_preview(const bContext *C,
133 Scene *scene,
134 ARegion *region,
135 SpaceSeq *sseq,
136 int timeline_frame,
137 int offset,
138 bool draw_overlay,
139 bool draw_backdrop);
142
144/* Get handle width in 2d-View space. */
145float sequence_handle_size_get_clamped(const Scene *scene, Sequence *seq, float pixelx);
146
147/* UNUSED */
148/* void seq_reset_imageofs(SpaceSeq *sseq); */
149
158 int timeline_frame,
159 int frame_ofs,
160 const char *viewname);
161
162/* `sequencer_thumbnails.cc` */
163
167
168/* sequencer_draw_channels.c */
169
170void draw_channels(const bContext *C, ARegion *region);
172 ARegion *region,
173 SeqChannelDrawContext *r_context);
174
175/* `sequencer_edit.cc` */
176
177void seq_rectf(const Scene *scene, const Sequence *seq, rctf *r_rect);
178Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int sel);
179void recurs_sel_seq(Sequence *seq_meta);
181 Sequence *activeseq,
182 int type,
183 Sequence **r_selseq1,
184 Sequence **r_selseq2,
185 const char **r_error_str);
186
187/* Operator helpers. */
191/* UNUSED */
192// bool sequencer_strip_poll( bContext *C);
198
207
208/* Externals. */
209
211extern const EnumPropertyItem prop_side_types[];
212
213/* Operators. */
214
234
238
243
248
251
254
256
260
264
265/* `sequencer_select.cc` */
266
280Sequence *find_nearest_seq(const Scene *scene,
281 const View2D *v2d,
282 const int mval[2],
283 eSeqHandle *r_hand);
284
285/* `sequencer_add.cc` */
286
295
296/* `sequencer_drag_drop.cc` */
297
299
300/* `sequencer_ops.cc` */
301
303void sequencer_keymap(wmKeyConfig *keyconf);
304
305/* `sequencer_buttons.cc` */
306
308
309/* sequencer_modifiers.c */
310
316
317/* `sequencer_view.cc` */
318
319void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom);
320void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box);
321
329
330/* `sequencer_channels_edit.cc` */
331
333
334/* `sequencer_preview.cc` */
335
336void sequencer_preview_add_sound(const bContext *C, const Sequence *seq);
337
338/* `sequencer_add.cc` */
339
341 int sfra,
342 int *r_minframe,
343 int *r_numdigits);
345 wmOperator *op, StripElem *se, int len, int minframe, int numdigits);
346
347/* `sequencer_retiming.cc` */
356 wmOperator *op,
357 SeqRetimingKey *key,
358 const Sequence *key_owner);
359/* Select a key and all following keys. */
361 wmOperator *op,
362 SeqRetimingKey *key,
363 const Sequence *key_owner);
367
368/* `sequencer_retiming_draw.cc` */
370 const StripDrawContext &strip_ctx);
374 const StripDrawContext &strip_ctx);
375void realize_fake_keys(const Scene *scene, Sequence *seq);
376SeqRetimingKey *try_to_realize_fake_keys(const bContext *C, Sequence *seq, const int mval[2]);
377SeqRetimingKey *retiming_mouseover_key_get(const bContext *C, const int mval[2], Sequence **r_seq);
378int left_fake_key_frame_get(const bContext *C, const Sequence *seq);
379int right_fake_key_frame_get(const bContext *C, const Sequence *seq);
381rctf seq_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Sequence *seq);
382
383/* `sequencer_timeline_draw.cc` */
386
387/* `sequencer_clipboard.cc` */
eSeqHandle
int len
static void draw_backdrop(const int fontid, const rctf *main_line_rect, const uint8_t color_bg[4], const short region_y_size, const float base_tick_height, const std::string &property_label)
Definition ed_draw.cc:227
bool sequencer_view_preview_only_poll(const bContext *C)
SeqRetimingKey * retiming_mouseover_key_get(const bContext *C, const int mval[2], Sequence **r_seq)
void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom)
void SEQUENCER_OT_retiming_transition_add(wmOperatorType *ot)
void SEQUENCER_OT_change_effect_input(wmOperatorType *ot)
void SEQUENCER_OT_movie_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_fit(wmOperatorType *ot)
void SEQUENCER_OT_retiming_show(wmOperatorType *ot)
bool sequencer_strip_has_path_poll(bContext *C)
void SEQUENCER_OT_retiming_freeze_frame_add(wmOperatorType *ot)
void SEQUENCER_OT_retiming_key_delete(wmOperatorType *ot)
void sequencer_retiming_draw_continuity(const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
void SEQUENCER_OT_mute(wmOperatorType *ot)
void draw_channels(const bContext *C, ARegion *region)
void SEQUENCER_OT_copy(wmOperatorType *ot)
void SEQUENCER_OT_delete(wmOperatorType *ot)
void SEQUENCER_OT_rendersize(wmOperatorType *ot)
void sequencer_dropboxes()
blender::Vector< Sequence * > sequencer_visible_strips_get(const bContext *C)
void recurs_sel_seq(Sequence *seq_meta)
void draw_timeline_seq_display(const bContext *C, ARegion *region)
int sequencer_retiming_key_select_exec(bContext *C, wmOperator *op, SeqRetimingKey *key, const Sequence *key_owner)
void sequencer_draw_preview(const bContext *C, Scene *scene, ARegion *region, SpaceSeq *sseq, int timeline_frame, int offset, bool draw_overlay, bool draw_backdrop)
void SEQUENCER_OT_set_range_to_strips(wmOperatorType *ot)
void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot)
int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequence **r_selseq1, Sequence **r_selseq2, const char **r_error_str)
void SEQUENCER_OT_enable_proxies(wmOperatorType *ot)
void seq_rectf(const Scene *scene, const Sequence *seq, rctf *r_rect)
void SEQUENCER_OT_select_more(wmOperatorType *ot)
void SEQUENCER_OT_select_all(wmOperatorType *ot)
int left_fake_key_frame_get(const bContext *C, const Sequence *seq)
SeqRetimingKey * try_to_realize_fake_keys(const bContext *C, Sequence *seq, const int mval[2])
void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot)
bool sequencer_draw_get_transform_preview(SpaceSeq *sseq, Scene *scene)
bool sequencer_view_has_preview_poll(bContext *C)
void SEQUENCER_OT_change_effect_type(wmOperatorType *ot)
void SEQUENCER_OT_mask_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_scene_frame_range_update(wmOperatorType *ot)
void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot)
void sequencer_retiming_keys_draw(const TimelineDrawContext *timeline_ctx, blender::Span< StripDrawContext > strips)
void SEQUENCER_OT_select_box(wmOperatorType *ot)
void draw_strip_thumbnails(TimelineDrawContext *ctx, blender::ed::seq::StripsDrawBatch &strips_batch, const blender::Vector< StripDrawContext > &strips)
void SEQUENCER_OT_reload(wmOperatorType *ot)
void SEQUENCER_OT_sample(wmOperatorType *ot)
void sequencer_special_update_set(Sequence *seq)
ImBuf * sequencer_ibuf_get(const bContext *C, int timeline_frame, int frame_ofs, const char *viewname)
void SEQUENCER_OT_sound_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_swap_data(wmOperatorType *ot)
int sequencer_retiming_select_linked_time(bContext *C, wmOperator *op, SeqRetimingKey *key, const Sequence *key_owner)
void SEQUENCER_OT_strip_modifier_equalizer_redefine(wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_clear(wmOperatorType *ot)
void channel_draw_context_init(const bContext *C, ARegion *region, SeqChannelDrawContext *r_context)
float sequence_handle_size_get_clamped(const Scene *scene, Sequence *seq, float pixelx)
void sequencer_retiming_speed_draw(const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
void SEQUENCER_OT_lock(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_add(wmOperatorType *ot)
void SEQUENCER_OT_select_linked(wmOperatorType *ot)
void SEQUENCER_OT_disconnect(wmOperatorType *ot)
void SEQUENCER_OT_select_handle(wmOperatorType *ot)
void SEQUENCER_OT_connect(wmOperatorType *ot)
void SEQUENCER_OT_select_inverse(wmOperatorType *ot)
void SEQUENCER_OT_strip_color_tag_set(wmOperatorType *ot)
void SEQUENCER_OT_images_separate(wmOperatorType *ot)
void SEQUENCER_OT_select_side(wmOperatorType *ot)
void SEQUENCER_OT_reassign_inputs(wmOperatorType *ot)
void SEQUENCER_OT_change_path(wmOperatorType *ot)
void sequencer_keymap(wmKeyConfig *keyconf)
void SEQUENCER_OT_select(wmOperatorType *ot)
int sequencer_clipboard_paste_exec(bContext *C, wmOperator *op)
blender::VectorSet< Sequence * > all_strips_from_context(bContext *C)
void SEQUENCER_OT_refresh_all(wmOperatorType *ot)
void SEQUENCER_OT_offset_clear(wmOperatorType *ot)
void draw_timeline_seq(const bContext *C, ARegion *region)
void SEQUENCER_OT_meta_make(wmOperatorType *ot)
bool sequencer_edit_with_channel_region_poll(bContext *C)
void SEQUENCER_OT_unmute(wmOperatorType *ot)
void SEQUENCER_OT_gap_insert(wmOperatorType *ot)
const EnumPropertyItem sequencer_prop_effect_types[]
void SEQUENCER_OT_view_all_preview(wmOperatorType *ot)
void SEQUENCER_OT_select_grouped(wmOperatorType *ot)
void SEQUENCER_OT_select_handles(wmOperatorType *ot)
const EnumPropertyItem prop_side_types[]
void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot)
void SEQUENCER_OT_duplicate(wmOperatorType *ot)
void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
Sequence * find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int sel)
Sequence * find_nearest_seq(const Scene *scene, const View2D *v2d, const int mval[2], eSeqHandle *r_hand)
void SEQUENCER_OT_movieclip_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_image_strip_add(wmOperatorType *ot)
int sequencer_retiming_select_all_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_strip_modifier_copy(wmOperatorType *ot)
void SEQUENCER_OT_effect_strip_add(wmOperatorType *ot)
bool sequencer_edit_poll(bContext *C)
void SEQUENCER_OT_retiming_reset(wmOperatorType *ot)
void realize_fake_keys(const Scene *scene, Sequence *seq)
void SEQUENCER_OT_select_less(wmOperatorType *ot)
int right_fake_key_frame_get(const bContext *C, const Sequence *seq)
bool sequencer_view_strips_poll(bContext *C)
void SEQUENCER_OT_slip(wmOperatorType *ot)
bool sequencer_editing_initialized_and_active(bContext *C)
void SEQUENCER_OT_swap(wmOperatorType *ot)
void SEQUENCER_OT_retiming_key_add(wmOperatorType *ot)
void SEQUENCER_OT_gap_remove(wmOperatorType *ot)
void SEQUENCER_OT_snap(wmOperatorType *ot)
void sequencer_image_seq_reserve_frames(wmOperator *op, StripElem *se, int len, int minframe, int numdigits)
void SEQUENCER_OT_strip_modifier_remove(wmOperatorType *ot)
bool sequencer_strip_editable_poll(bContext *C)
void SEQUENCER_OT_view_frame(wmOperatorType *ot)
void SEQUENCER_OT_view_selected(wmOperatorType *ot)
int sequencer_select_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_all(wmOperatorType *ot)
void SEQUENCER_OT_retiming_segment_speed_set(wmOperatorType *ot)
void SEQUENCER_OT_paste(wmOperatorType *ot)
void SEQUENCER_OT_swap_inputs(wmOperatorType *ot)
void SEQUENCER_OT_meta_toggle(wmOperatorType *ot)
bool retiming_keys_can_be_displayed(const SpaceSeq *sseq)
void SEQUENCER_OT_export_subtitles(wmOperatorType *ot)
void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box)
void SEQUENCER_OT_change_scene(wmOperatorType *ot)
int sequencer_clipboard_copy_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_split(wmOperatorType *ot)
void SEQUENCER_OT_scene_strip_add(wmOperatorType *ot)
void sequencer_buttons_register(ARegionType *art)
void SEQUENCER_OT_unlock(wmOperatorType *ot)
void SEQUENCER_OT_cursor_set(wmOperatorType *ot)
rctf seq_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Sequence *seq)
void SEQUENCER_OT_scene_strip_add_new(wmOperatorType *ot)
void sequencer_preview_add_sound(const bContext *C, const Sequence *seq)
int sequencer_image_seq_get_minmax_frame(wmOperator *op, int sfra, int *r_minframe, int *r_numdigits)
void SEQUENCER_OT_strip_jump(wmOperatorType *ot)
void SEQUENCER_OT_rename_channel(wmOperatorType *ot)
void SEQUENCER_OT_meta_separate(wmOperatorType *ot)
int sequencer_retiming_box_select_exec(bContext *C, wmOperator *op)
int sequencer_draw_get_transform_preview_frame(Scene *scene)
void SEQUENCER_OT_strip_modifier_move(wmOperatorType *ot)
void sequencer_operatortypes()
blender::Map< SeqRetimingKey *, Sequence * > retiming_selection
GPUFrameBuffer * framebuffer_overlay
blender::ed::seq::SeqScopes scopes
wmOperatorType * ot
Definition wm_files.cc:4125