Blender V5.0
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_rect.h"
13#include "BLI_span.hh"
14#include "BLI_string_ref.hh"
15#include "BLI_utility_mixins.hh"
16#include "BLI_vector.hh"
17#include "BLI_vector_set.hh"
18
19#include "DNA_sequence_types.h"
20
21#include "RNA_access.hh"
22
23#include "GPU_viewport.hh"
24
25#include "ED_sequencer.hh"
26
27#include "sequencer_scopes.hh"
28
29/* Internal exports only. */
30
31struct ARegion;
32struct ARegionType;
35struct Scene;
36struct SeqRetimingKey;
37struct Strip;
38struct SpaceSeq;
39struct StripElem;
40struct View2D;
41struct bContext;
42struct rctf;
43struct wmKeyConfig;
44struct wmOperator;
45struct wmOperatorType;
46struct ScrArea;
47struct Editing;
48struct ListBase;
49
50namespace blender::ed::asset {
51struct AssetItemTree;
52}
53
54namespace blender::ed::vse {
55
56class SeqQuadsBatch;
57class StripsDrawBatch;
58
59#define DEFAULT_IMG_STRIP_LENGTH 25 /* XXX arbitrary but ok for now. */
60
64
66
67 std::shared_ptr<asset::AssetItemTree> assets_for_menu;
68
69 SpaceSeq_Runtime() = default;
71};
72
91
94 const FCurve *curve = nullptr; /* Curve for overlay, if any (blend factor or volume). */
95
96 /* Strip boundary in timeline space. Content start/end is clamped by left/right handle. */
98 float left_handle, right_handle; /* Position in frames. */
99 float strip_content_top; /* Position in timeline space without content and text overlay. */
100 float handle_width; /* Width of strip handle in frames. */
102
106 bool strip_is_too_small; /* Shorthand for (!can_draw_text_overlay && !can_draw_strip_content). */
108 bool is_single_image; /* Strip has single frame of content. */
114};
115
131
132/* `sequencer_timeline_draw.cc` */
133
134/* Returns value in frames (view-space), 5px for large strips, 1/4 of the strip for smaller. */
135float strip_handle_draw_size_get(const Scene *scene, Strip *strip, float pixelx);
136void draw_timeline_seq(const bContext *C, ARegion *region);
137void draw_timeline_seq_display(const bContext *C, ARegion *region);
138
139/* `sequencer_preview_draw.cc` */
140
147void sequencer_preview_region_draw(const bContext *C, ARegion *region);
149
150/* UNUSED */
151/* void seq_reset_imageofs(SpaceSeq *sseq); */
152
160ImBuf *sequencer_ibuf_get(const bContext *C, int timeline_frame, const char *viewname);
161
162/* `sequencer_thumbnails.cc` */
163
165 StripsDrawBatch &strips_batch,
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 slip_modal_keymap(wmKeyConfig *keyconf);
179 int num_inputs,
180 bool ignore_active = false);
182
183/* Operator helpers. */
187/* UNUSED */
188// bool sequencer_strip_poll( bContext *C);
194
203
204/* Externals. */
205
207extern const EnumPropertyItem prop_side_types[];
208
209/* Operators. */
210
230
234
239
243
246
249
251
255
259
260/* `sequencer_select.cc` */
261
262void strip_rectf(const Scene *scene, const Strip *strip, rctf *r_rect);
263Strip *find_neighboring_strip(const Scene *scene, const Strip *test, const int lr, int sel);
264void recurs_sel_strip(Strip *strip_meta);
265
281
282bool strip_point_image_isect(const Scene *scene, const Strip *strip, float point_view[2]);
283void sequencer_select_do_updates(const bContext *C, Scene *scene);
294Strip *strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2]);
295
296/* `sequencer_add.cc` */
297
307
308/* `sequencer_drag_drop.cc` */
309
311
312/* `sequencer_ops.cc` */
313
315void sequencer_keymap(wmKeyConfig *keyconf);
316
317/* `sequencer_buttons.cc` */
318
320
321/* sequencer_modifiers.c */
322
330
331/* `sequencer_view.cc` */
332
333void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom);
334void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box);
335
343
344/* `sequencer_channels_edit.cc` */
345
347
348/* `sequencer_preview.cc` */
349
350void sequencer_preview_add_sound(const bContext *C, const Strip *strip);
351
352/* `sequencer_add.cc` */
353
355 int sfra,
356 int *r_minframe,
357 int *r_numdigits);
359 wmOperator *op, StripElem *se, int len, int minframe, int numdigits);
360
361/* `sequencer_retiming.cc` */
370 wmOperator *op,
371 SeqRetimingKey *key,
372 const Strip *key_owner);
373/* Select a key and all following keys. */
375 wmOperator *op,
376 SeqRetimingKey *key,
377 const Strip *key_owner);
381
382/* `sequencer_retiming_draw.cc` */
384 const StripDrawContext &strip_ctx);
388 const StripDrawContext &strip_ctx);
389void realize_fake_keys(const Scene *scene, Strip *strip);
390SeqRetimingKey *try_to_realize_fake_keys(const bContext *C, Strip *strip, const int mval[2]);
391SeqRetimingKey *retiming_mouseover_key_get(const bContext *C, const int mval[2], Strip **r_strip);
392int left_fake_key_frame_get(const bContext *C, const Strip *strip);
393int right_fake_key_frame_get(const bContext *C, const Strip *strip);
395rctf strip_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Strip *strip);
396
397/* `sequencer_text_edit.cc` */
412
413/* `sequencer_timeline_draw.cc` */
416
417/* `sequencer_clipboard.cc` */
421 wmOperator *op,
422 const wmEvent *event);
423
424/* `sequencer_add_menu_scene_assets.cc` */
428
429} // namespace blender::ed::vse
struct TextVarsRuntime TextVarsRuntime
#define C
Definition RandGen.cpp:29
BMesh const char void * data
NonCopyable(const NonCopyable &other)=delete
void SEQUENCER_OT_mask_strip_add(wmOperatorType *ot)
blender::IndexRange strip_text_selection_range_get(const TextVars *data)
void SEQUENCER_OT_retiming_transition_add(wmOperatorType *ot)
void SEQUENCER_OT_meta_toggle(wmOperatorType *ot)
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_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)
void SEQUENCER_OT_text_edit_copy(wmOperatorType *ot)
void sequencer_retiming_draw_continuity(const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
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_select_all(wmOperatorType *ot)
void SEQUENCER_OT_copy(wmOperatorType *ot)
SeqRetimingKey * retiming_mouseover_key_get(const bContext *C, const int mval[2], Strip **r_strip)
wmOperatorStatus sequencer_clipboard_copy_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_selected(wmOperatorType *ot)
int right_fake_key_frame_get(const bContext *C, const Strip *strip)
void SEQUENCER_OT_retiming_reset(wmOperatorType *ot)
void SEQUENCER_OT_select_box(wmOperatorType *ot)
void sequencer_image_strip_reserve_frames(wmOperator *op, StripElem *se, int len, int minframe, int numdigits)
void SEQUENCER_OT_text_delete(wmOperatorType *ot)
void SEQUENCER_OT_text_edit_cut(wmOperatorType *ot)
void SEQUENCER_OT_select_inverse(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_retiming_speed_draw(const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
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)
void SEQUENCER_OT_select_grouped(wmOperatorType *ot)
void recurs_sel_strip(Strip *strip_meta)
void SEQUENCER_OT_refresh_all(wmOperatorType *ot)
blender::VectorSet< Strip * > all_strips_from_context(bContext *C)
void SEQUENCER_OT_add_scene_strip_from_scene_asset(wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_clear(wmOperatorType *ot)
float strip_handle_draw_size_get(const Scene *scene, Strip *strip, float pixelx)
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)
const EnumPropertyItem sequencer_prop_effect_types[]
void SEQUENCER_OT_select(wmOperatorType *ot)
void draw_timeline_seq(const bContext *C, ARegion *region)
void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom)
Strip * find_neighboring_strip(const Scene *scene, const Strip *test, const int lr, int sel)
void draw_strip_thumbnails(TimelineDrawContext *ctx, StripsDrawBatch &strips_batch, const blender::Vector< StripDrawContext > &strips)
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_retiming_keys_draw(const TimelineDrawContext *timeline_ctx, blender::Span< StripDrawContext > strips)
void SEQUENCER_OT_strip_modifier_remove(wmOperatorType *ot)
void SEQUENCER_OT_select_more(wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_set_active(wmOperatorType *ot)
void SEQUENCER_OT_strip_color_tag_set(wmOperatorType *ot)
StringRef effect_inputs_validate(const VectorSet< Strip * > &inputs, int num_inputs)
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)
VectorSet< Strip * > strip_effect_get_new_inputs(const Scene *scene, int num_inputs, bool ignore_active)
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)
SeqRetimingKey * try_to_realize_fake_keys(const bContext *C, Strip *strip, const int mval[2])
bool sequencer_edit_with_channel_region_poll(bContext *C)
void SEQUENCER_OT_strip_modifier_equalizer_redefine(wmOperatorType *ot)
Strip * strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2])
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 strip_rectf(const Scene *scene, const Strip *strip, rctf *r_rect)
void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot)
void SEQUENCER_OT_text_select_all(wmOperatorType *ot)
rctf strip_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Strip *strip)
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 SEQUENCER_OT_retiming_show(wmOperatorType *ot)
bool sequencer_strip_editable_poll(bContext *C)
void SEQUENCER_OT_change_path(wmOperatorType *ot)
bool retiming_keys_can_be_displayed(const SpaceSeq *sseq)
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 realize_fake_keys(const Scene *scene, Strip *strip)
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)
int left_fake_key_frame_get(const bContext *C, const Strip *strip)
void SEQUENCER_OT_rename_channel(wmOperatorType *ot)
blender::int2 strip_text_cursor_offset_to_position(const TextVarsRuntime *text, int cursor_offset)
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)
const EnumPropertyItem prop_side_types[]
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)
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)
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 slip_modal_keymap(wmKeyConfig *keyconf)
void SEQUENCER_OT_text_cursor_move(wmOperatorType *ot)
void SEQUENCER_OT_export_subtitles(wmOperatorType *ot)
blender::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)
int sequencer_image_strip_get_minmax_frame(wmOperator *op, int sfra, int *r_minframe, int *r_numdigits)
void SEQUENCER_OT_split(wmOperatorType *ot)
void SEQUENCER_OT_scene_strip_add_new(wmOperatorType *ot)
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)
wmOperatorStatus sequencer_retiming_select_linked_time(bContext *C, wmOperator *op, SeqRetimingKey *key, const Strip *key_owner)
void SEQUENCER_OT_text_edit_mode_toggle(wmOperatorType *ot)
VecBase< int32_t, 2 > int2
static blender::bke::bNodeSocketTemplate inputs[]
std::shared_ptr< asset::AssetItemTree > assets_for_menu
blender::gpu::FrameBuffer * framebuffer_overlay
blender::Map< SeqRetimingKey *, Strip * > retiming_selection
uint len
wmOperatorType * ot
Definition wm_files.cc:4237