Blender V4.5
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::vse {
51
52class SeqQuadsBatch;
53class StripsDrawBatch;
54
55#define DEFAULT_IMG_STRIP_LENGTH 25 /* XXX arbitrary but ok for now. */
56
66
85
88 const FCurve *curve = nullptr; /* Curve for overlay, if any (blend factor or volume). */
89
90 /* Strip boundary in timeline space. Content start/end is clamped by left/right handle. */
92 float left_handle, right_handle; /* Position in frames. */
93 float strip_content_top; /* Position in timeline space without content and text overlay. */
94 float handle_width; /* Width of strip handle in frames. */
96
100 bool strip_is_too_small; /* Shorthand for (!can_draw_text_overlay && !can_draw_strip_content). */
102 bool is_single_image; /* Strip has single frame of content. */
108};
109
125
126/* `sequencer_timeline_draw.cc` */
127
128void draw_timeline_seq(const bContext *C, ARegion *region);
129void draw_timeline_seq_display(const bContext *C, ARegion *region);
130
131/* `sequencer_preview_draw.cc` */
132
139void sequencer_preview_region_draw(const bContext *C, ARegion *region);
140
143
145/* Get handle width in 2d-View space. */
146float strip_handle_draw_size_get(const Scene *scene, Strip *strip, float pixelx);
147
148/* UNUSED */
149/* void seq_reset_imageofs(SpaceSeq *sseq); */
150
158ImBuf *sequencer_ibuf_get(const bContext *C, int timeline_frame, const char *viewname);
159
160/* `sequencer_thumbnails.cc` */
161
163 StripsDrawBatch &strips_batch,
165
166/* sequencer_draw_channels.c */
167
168void draw_channels(const bContext *C, ARegion *region);
170 ARegion *region,
171 SeqChannelDrawContext *r_context);
172
173/* `sequencer_edit.cc` */
174
175void slip_modal_keymap(wmKeyConfig *keyconf);
177 int num_inputs,
178 bool ignore_active = false);
180
181/* Operator helpers. */
185/* UNUSED */
186// bool sequencer_strip_poll( bContext *C);
192
201
202/* Externals. */
203
205extern const EnumPropertyItem prop_side_types[];
206
207/* Operators. */
208
228
232
237
241
244
247
249
253
257
258/* `sequencer_select.cc` */
259
260void strip_rectf(const Scene *scene, const Strip *strip, rctf *r_rect);
261Strip *find_neighboring_strip(const Scene *scene, const Strip *test, const int lr, int sel);
262void recurs_sel_strip(Strip *strip_meta);
263
277
278bool strip_point_image_isect(const Scene *scene, const Strip *strip, float point_view[2]);
279void sequencer_select_do_updates(const bContext *C, Scene *scene);
290Strip *strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2]);
291
292/* `sequencer_add.cc` */
293
302
303/* `sequencer_drag_drop.cc` */
304
306
307/* `sequencer_ops.cc` */
308
310void sequencer_keymap(wmKeyConfig *keyconf);
311
312/* `sequencer_buttons.cc` */
313
315
316/* sequencer_modifiers.c */
317
323
324/* `sequencer_view.cc` */
325
326void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom);
327void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box);
328
336
337/* `sequencer_channels_edit.cc` */
338
340
341/* `sequencer_preview.cc` */
342
343void sequencer_preview_add_sound(const bContext *C, const Strip *strip);
344
345/* `sequencer_add.cc` */
346
348 int sfra,
349 int *r_minframe,
350 int *r_numdigits);
352 wmOperator *op, StripElem *se, int len, int minframe, int numdigits);
353
354/* `sequencer_retiming.cc` */
363 wmOperator *op,
364 SeqRetimingKey *key,
365 const Strip *key_owner);
366/* Select a key and all following keys. */
368 wmOperator *op,
369 SeqRetimingKey *key,
370 const Strip *key_owner);
374
375/* `sequencer_retiming_draw.cc` */
377 const StripDrawContext &strip_ctx);
381 const StripDrawContext &strip_ctx);
382void realize_fake_keys(const Scene *scene, Strip *strip);
383SeqRetimingKey *try_to_realize_fake_keys(const bContext *C, Strip *strip, const int mval[2]);
384SeqRetimingKey *retiming_mouseover_key_get(const bContext *C, const int mval[2], Strip **r_strip);
385int left_fake_key_frame_get(const bContext *C, const Strip *strip);
386int right_fake_key_frame_get(const bContext *C, const Strip *strip);
388rctf strip_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Strip *strip);
389
390/* `sequencer_text_edit.cc` */
405
406/* `sequencer_timeline_draw.cc` */
409
410/* `sequencer_clipboard.cc` */
413
414} // 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)
void sequencer_image_seq_reserve_frames(wmOperator *op, StripElem *se, int len, int minframe, int numdigits)
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_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_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_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)
bool sequencer_draw_get_transform_preview(SpaceSeq *sseq, Scene *scene)
void SEQUENCER_OT_strip_modifier_remove(wmOperatorType *ot)
void SEQUENCER_OT_select_more(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_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)
int sequencer_draw_get_transform_preview_frame(const Scene *scene)
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)
const EnumPropertyItem prop_side_types[]
void SEQUENCER_OT_select_linked(wmOperatorType *ot)
int sequencer_image_seq_get_minmax_frame(wmOperator *op, int sfra, int *r_minframe, int *r_numdigits)
void SEQUENCER_OT_text_edit_paste(wmOperatorType *ot)
void SEQUENCER_OT_delete(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)
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[]
blender::Map< SeqRetimingKey *, Strip * > retiming_selection
uint len
wmOperatorType * ot
Definition wm_files.cc:4225