Blender V5.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
8
9#pragma once
10
11#include "BLI_map.hh"
12#include "BLI_span.hh"
13#include "BLI_string_ref.hh"
14#include "BLI_utility_mixins.hh"
15#include "BLI_vector.hh"
16#include "BLI_vector_set.hh"
17
18#include "DNA_listBase.h"
19#include "DNA_sequence_types.h"
21
22#include "RNA_access.hh"
23
24#include "GPU_viewport.hh"
25
26#include "sequencer_scopes.hh"
27
28namespace blender {
29
30/* Internal exports only. */
31
32struct ARegion;
33struct ARegionType;
34struct bContext;
37struct Editing;
38struct MenuType;
39struct rctf;
40struct Scene;
41struct ScrArea;
42struct SeqRetimingKey;
44struct SpaceSeq;
45struct Strip;
46struct StripElem;
47struct View2D;
48struct wmEvent;
49struct wmKeyConfig;
50struct wmOperator;
51struct wmOperatorType;
52struct wmGizmoGroupType;
53
54namespace ed::asset {
55struct AssetItemTree;
56}
57
58namespace seq {
59enum class Side : int;
60}
61
62namespace ed::vse {
63
64class SeqQuadsBatch;
65class StripsDrawBatch;
66
70
72
73 std::shared_ptr<asset::AssetItemTree> assets_for_menu;
74
75 SpaceSeq_Runtime() = default;
77};
78
80 const bContext *C;
86
89 ListBaseT<Strip> *seqbase; /* Displayed seqbase. */
90 ListBaseT<SeqTimelineChannel> *channels; /* Displayed channels. */
91
95 float scale;
96};
97
100 const FCurve *curve = nullptr; /* Curve for overlay, if any (blend factor or volume). */
101
102 /* Strip boundary in timeline space. Content start/end is clamped by left/right handle. */
104 float left_handle, right_handle; /* Position in frames. */
105 float strip_content_top; /* Position in timeline space without content and text overlay. */
106 float handle_width; /* Width of strip handle in frames. */
108
112 bool strip_is_too_small; /* Shorthand for (!can_draw_text_overlay && !can_draw_strip_content). */
114 bool is_single_image; /* Strip has single frame of content. */
121};
122
139
140/* `sequencer_timeline_draw.cc` */
141
142/* Returns value in frames (view-space), 5px for large strips, 1/4 of the strip for smaller. */
143float strip_handle_draw_size_get(const Scene *scene, const Strip *strip, float pixelx);
144void draw_timeline_seq(const bContext *C, const ARegion *region);
146void draw_timeline_seq_display(const bContext *C, ARegion *region);
149
151
152/* `sequencer_preview_draw.cc` */
153
160void sequencer_preview_region_draw(const bContext *C, ARegion *region);
162
163/* UNUSED */
164/* void seq_reset_imageofs(SpaceSeq *sseq); */
165
173ImBuf *sequencer_ibuf_get(const bContext *C, int timeline_frame, const char *viewname);
174
175/* `sequencer_thumbnails.cc` */
176
178 StripsDrawBatch &strips_batch,
179 const Vector<StripDrawContext> &strips);
180
181/* sequencer_channels_draw.cc */
182
183void draw_channels(const bContext *C, ARegion *region);
185 ARegion *region,
186 SeqChannelDrawContext *r_context);
187
188/* `sequencer_edit.cc` */
189
190void slip_modal_keymap(wmKeyConfig *keyconf);
192 StripType effect_type,
193 bool ignore_active = false);
194bool effect_inputs_validate(int have_inputs, int num_inputs, ReportList *reports);
195
196/* Operator helpers. */
200/* UNUSED */
201// bool sequencer_strip_poll( bContext *C);
208
214
219
220/* Externals. */
221
225
226/* Operators. */
227
250
254
259
263
266
269
271
275
279
280/* `sequencer_select.cc` */
281
290rctf strip_bounds_get(const Scene *scene, const Strip *strip);
291
292Strip *find_neighboring_strip(const Scene *scene, const Strip *test, const seq::Side lr, int sel);
293
309
310bool strip_point_image_isect(const Scene *scene, const Strip *strip, float point_view[2]);
311void sequencer_select_do_updates(const bContext *C, Scene *scene);
322Strip *strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2]);
323
324/* `sequencer_add.cc` */
325
336
337void frame_filename_set(char *dst,
338 size_t dst_maxncpy,
339 const char *filename_stripped,
340 const int frame,
341 const int numdigits,
342 const char *ext);
343
344/* `sequencer_drag_drop.cc` */
345
347
348/* `sequencer_ops.cc` */
349
351void sequencer_keymap(wmKeyConfig *keyconf);
352
353/* `sequencer_buttons.cc` */
354
356
357/* sequencer_modifier.cc */
358
367
368/* `sequencer_view.cc` */
369
370void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom);
371void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box);
372
373rctf SEQ_view_frame_fit(const SpaceSeq *sseq, const ARegion *region, rctf v2d_rect);
374
382
383/* `sequencer_channels_edit.cc` */
384
386
387/* `sequencer_preview.cc` */
388
389void sequencer_preview_add_sound(const bContext *C, const Strip *strip);
390
391/* `sequencer_retiming.cc` */
400 const View2D *v2d,
401 const int mval[2],
402 Strip **r_strip);
403bool is_mouse_over_retiming_keys_box(const Scene *scene,
404 const Strip *strip,
405 const View2D *v2d,
406 const SpaceSeq *sseq,
407 int mouse_co_region[2]);
409 const View2D *v2d,
410 Strip *strip,
411 const int mval[2]);
413 wmOperator *op,
414 SeqRetimingKey *key,
415 const Strip *key_owner);
416/* Select a key and all following keys. */
420
421/* `sequencer_retiming_draw.cc` */
423 const StripDrawContext &strip_ctx);
426 const StripDrawContext &strip_ctx);
427rcti strip_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Strip *strip);
428bool retiming_overlay_enabled(const SpaceSeq *sseq);
429
430/* `sequencer_text_edit.cc` */
432
452std::optional<int2> sequencer_text_editing_cursor_region_xy_get(const Scene *scene,
453 const ARegion *region,
454 const Strip *strip);
455
467int2 strip_text_cursor_offset_to_position(const seq::TextVarsRuntime *runtime, int cursor_offset);
469
470/* `sequencer_timeline_draw.cc` */
473
474/* `sequencer_clipboard.cc` */
478 wmOperator *op,
479 const wmEvent *event);
480
481/* `sequencer_add_menu_scene_assets.cc` */
485
487
488} // namespace ed::vse
489} // namespace blender
These structs are the foundation for all linked lists in the library system.
#define C
Definition RandGen.cpp:29
NonCopyable(const NonCopyable &other)=delete
void SEQUENCER_OT_mask_strip_add(wmOperatorType *ot)
IndexRange strip_text_selection_range_get(const TextVars *data)
void SEQUENCER_OT_retiming_transition_add(wmOperatorType *ot)
void SEQUENCER_OT_meta_toggle(wmOperatorType *ot)
Strip * find_neighboring_strip(const Scene *scene, const Strip *test, const seq::Side lr, int sel)
void sequencer_preview_add_sound(const bContext *C, const Strip *strip)
bool sequencer_edit_poll(bContext *C)
void SEQUENCER_OT_meta_make(wmOperatorType *ot)
void SEQUENCER_OT_select_by_type(wmOperatorType *ot)
void SEQUENCER_OT_view_all_preview(wmOperatorType *ot)
void SEQUENCER_OT_images_separate(wmOperatorType *ot)
void SEQUENCER_OT_snap(wmOperatorType *ot)
void SEQUENCER_OT_swap_inputs(wmOperatorType *ot)
void SEQUENCER_OT_enable_proxies(wmOperatorType *ot)
float strip_handle_draw_size_get(const Scene *scene, const Strip *strip, float pixelx)
void SEQUENCER_OT_text_edit_copy(wmOperatorType *ot)
bool retiming_overlay_enabled(const SpaceSeq *sseq)
const EnumPropertyItem prop_snap_side_types[]
void channel_draw_context_init(const bContext *C, ARegion *region, SeqChannelDrawContext *r_context)
void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot)
void SEQUENCER_OT_offset_clear(wmOperatorType *ot)
void SEQUENCER_OT_text_line_break(wmOperatorType *ot)
void SEQUENCER_OT_box_blade(wmOperatorType *ot)
rctf strip_bounds_get(const Scene *scene, const Strip *strip)
void SEQUENCER_OT_select_all(wmOperatorType *ot)
void SEQUENCER_OT_copy(wmOperatorType *ot)
wmOperatorStatus sequencer_clipboard_copy_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_selected(wmOperatorType *ot)
void SEQUENCER_OT_retiming_reset(wmOperatorType *ot)
void SEQUENCER_OT_select_box(wmOperatorType *ot)
void SEQUENCER_OT_text_delete(wmOperatorType *ot)
void SEQUENCER_OT_text_edit_cut(wmOperatorType *ot)
void SEQUENCER_OT_gap_remove(wmOperatorType *ot)
void SEQUENCER_OT_view_frame(wmOperatorType *ot)
void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
bool sequencer_text_editing_active_poll(bContext *C)
void SEQUENCER_OT_select_circle(wmOperatorType *ot)
void SEQUENCER_OT_select_side_of_frame(wmOperatorType *ot)
void SEQUENCER_OT_retiming_segment_speed_set(wmOperatorType *ot)
void SEQUENCER_OT_movieclip_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_gap_insert(wmOperatorType *ot)
void SEQUENCER_OT_change_scene(wmOperatorType *ot)
bool is_mouse_over_retiming_keys_box(const Scene *scene, const Strip *strip, const View2D *v2d, const SpaceSeq *sseq, int mouse_co_region[2])
void draw_timeline_seq(const bContext *C, const ARegion *region)
void SEQUENCER_OT_select_grouped(wmOperatorType *ot)
void draw_strip_thumbnails(const TimelineDrawContext &ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
void SEQUENCER_OT_refresh_all(wmOperatorType *ot)
SeqRetimingKey * try_to_realize_fake_keys(const Scene *scene, const View2D *v2d, Strip *strip, const int mval[2])
void SEQUENCER_GGT_blade(wmGizmoGroupType *gzgt)
void SEQUENCER_OT_add_scene_strip_from_scene_asset(wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_clear(wmOperatorType *ot)
void SEQUENCER_OT_lock(wmOperatorType *ot)
wmOperatorStatus sequencer_select_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_effect_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_sample(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_duplicate(wmOperatorType *ot)
void sequencer_blade_tooltip_show(bContext *C)
const EnumPropertyItem sequencer_prop_effect_types[]
void SEQUENCER_OT_select(wmOperatorType *ot)
void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom)
rctf SEQ_view_frame_fit(const SpaceSeq *sseq, const ARegion *region, rctf v2d_rect)
void SEQUENCER_OT_text_insert(wmOperatorType *ot)
void SEQUENCER_OT_mute(wmOperatorType *ot)
void SEQUENCER_OT_select_side(wmOperatorType *ot)
void sequencer_preview_region_draw(const bContext *C, ARegion *region)
void SEQUENCER_OT_select_less(wmOperatorType *ot)
void SEQUENCER_OT_text_deselect_all(wmOperatorType *ot)
bool sequencer_editing_initialized_and_active(bContext *C)
void SEQUENCER_OT_strip_modifier_remove(wmOperatorType *ot)
void SEQUENCER_OT_select_more(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_set_active(wmOperatorType *ot)
int2 strip_text_cursor_offset_to_position(const seq::TextVarsRuntime *runtime, int cursor_offset)
void SEQUENCER_OT_strip_color_tag_set(wmOperatorType *ot)
VectorSet< Strip * > strip_effect_get_new_inputs(const Scene *scene, StripType effect_type, bool ignore_active)
void SEQUENCER_OT_ripple_trim(wmOperatorType *ot)
void SEQUENCER_OT_slip(wmOperatorType *ot)
void SEQUENCER_OT_unmute(wmOperatorType *ot)
wmOperatorStatus sequencer_retiming_box_select_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_select_handles(wmOperatorType *ot)
void SEQUENCER_OT_view_all(wmOperatorType *ot)
void SEQUENCER_OT_connect(wmOperatorType *ot)
void SEQUENCER_OT_select_lasso(wmOperatorType *ot)
void SEQUENCER_OT_retiming_key_delete(wmOperatorType *ot)
void SEQUENCER_OT_change_effect_type(wmOperatorType *ot)
void SEQUENCER_OT_paste(wmOperatorType *ot)
bool effect_inputs_validate(int have_inputs, int num_inputs, ReportList *reports)
bool sequencer_edit_with_channel_region_poll(bContext *C)
void SEQUENCER_OT_strip_modifier_equalizer_redefine(wmOperatorType *ot)
void sequencer_blade_handlers_add(ARegion *region)
Strip * strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2])
rctf box_blade_rect_get(wmOperator *op, const View2D *v2d)
bool sequencer_strip_editable_and_selected_poll(bContext *C)
void SEQUENCER_OT_movie_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_rendersize(wmOperatorType *ot)
void SEQUENCER_OT_scene_frame_range_update(wmOperatorType *ot)
void sequencer_select_do_updates(const bContext *C, Scene *scene)
void SEQUENCER_OT_reload(wmOperatorType *ot)
void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot)
void SEQUENCER_OT_text_select_all(wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_fit(wmOperatorType *ot)
bool sequencer_view_preview_only_poll(const bContext *C)
void SEQUENCER_OT_scene_strip_add(wmOperatorType *ot)
void frame_filename_set(char *dst, size_t dst_maxncpy, const char *filename_stripped, const int frame, const int numdigits, const char *ext)
void SEQUENCER_OT_retiming_show(wmOperatorType *ot)
bool sequencer_strip_editable_poll(bContext *C)
void SEQUENCER_OT_change_path(wmOperatorType *ot)
void sequencer_retiming_draw_segments(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
void SEQUENCER_OT_retiming_key_add(wmOperatorType *ot)
void SEQUENCER_OT_select_handle(wmOperatorType *ot)
void sequencer_special_update_set(Strip *strip)
void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot)
void sequencer_operatortypes()
void SEQUENCER_OT_set_range_to_strips(wmOperatorType *ot)
void SEQUENCER_OT_reassign_inputs(wmOperatorType *ot)
void SEQUENCER_OT_unlock(wmOperatorType *ot)
bool sequencer_view_has_preview_poll(bContext *C)
void SEQUENCER_OT_sound_strip_add(wmOperatorType *ot)
wmOperatorStatus sequencer_retiming_select_all_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_rename_channel(wmOperatorType *ot)
SeqRetimingKey * retiming_mouseover_key_get(const Scene *scene, const View2D *v2d, const int mval[2], Strip **r_strip)
void SEQUENCER_OT_swap(wmOperatorType *ot)
void SEQUENCER_OT_duplicate(wmOperatorType *ot)
wmOperatorStatus sequencer_clipboard_paste_exec(bContext *C, wmOperator *op)
void draw_timeline_seq_display(const bContext *C, ARegion *region)
wmOperatorStatus sequencer_clipboard_paste_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void sequencer_scrubbing_region_draw(const bContext *C, ARegion *region)
void sequencer_retiming_keys_draw(const TimelineDrawContext &ctx, Span< StripDrawContext > strips)
void SEQUENCER_OT_select_linked(wmOperatorType *ot)
void SEQUENCER_OT_text_edit_paste(wmOperatorType *ot)
void SEQUENCER_OT_delete(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_move_to_index(wmOperatorType *ot)
void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box)
void SEQUENCER_OT_text_strip_add(wmOperatorType *ot)
ImBuf * sequencer_ibuf_get(const bContext *C, int timeline_frame, const char *viewname)
void SEQUENCER_OT_meta_separate(wmOperatorType *ot)
void draw_channels(const bContext *C, ARegion *region)
bool strip_point_image_isect(const Scene *scene, const Strip *strip, float point_view[2])
bool sequencer_view_strips_poll(bContext *C)
rcti strip_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Strip *strip)
void SEQUENCER_OT_retiming_freeze_frame_add(wmOperatorType *ot)
void sequencer_buttons_register(ARegionType *art)
void SEQUENCER_OT_image_strip_add(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_move(wmOperatorType *ot)
void sequencer_retiming_speed_labels_draw(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
const EnumPropertyItem prop_split_side_types[]
void slip_modal_keymap(wmKeyConfig *keyconf)
void SEQUENCER_OT_text_cursor_move(wmOperatorType *ot)
void SEQUENCER_OT_export_subtitles(wmOperatorType *ot)
void SEQUENCER_OT_ripple_delete(wmOperatorType *ot)
bool split_only_selected_get(wmOperator *op)
const Strip * sequencer_text_editing_cursor_strip_get(const Scene *scene)
VectorSet< Strip * > all_strips_from_context(bContext *C)
Vector< Strip * > sequencer_visible_strips_get(const bContext *C)
void sequencer_keymap(wmKeyConfig *keyconf)
bool sequencer_strip_has_path_poll(bContext *C)
void SEQUENCER_OT_swap_data(wmOperatorType *ot)
void SEQUENCER_OT_disconnect(wmOperatorType *ot)
void SEQUENCER_OT_split(wmOperatorType *ot)
void SEQUENCER_OT_scene_strip_add_new(wmOperatorType *ot)
std::optional< int2 > sequencer_text_editing_cursor_region_xy_get(const Scene *scene, const ARegion *region, const Strip *strip)
void SEQUENCER_OT_text_cursor_set(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_add(wmOperatorType *ot)
void SEQUENCER_OT_cursor_set(wmOperatorType *ot)
wmOperatorStatus sequencer_retiming_key_select_exec(bContext *C, wmOperator *op, SeqRetimingKey *key, const Strip *key_owner)
void SEQUENCER_OT_strip_modifier_copy(wmOperatorType *ot)
void SEQUENCER_OT_strip_jump(wmOperatorType *ot)
void SEQUENCER_OT_text_edit_mode_toggle(wmOperatorType *ot)
BMesh Iterators.
VecBase< int32_t, 2 > int2
BMesh const char void * data
ListBaseT< SeqTimelineChannel > * channels
std::shared_ptr< asset::AssetItemTree > assets_for_menu
Map< SeqRetimingKey *, Strip * > retiming_selection
ListBaseT< SeqTimelineChannel > * channels