Blender  V3.3
sequencer_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "DNA_sequence_types.h"
11 #include "RNA_access.h"
12 
13 /* Internal exports only. */
14 
15 struct ARegion;
16 struct ARegionType;
17 struct Depsgraph;
18 struct Main;
19 struct Scene;
20 struct SeqCollection;
21 struct Sequence;
22 struct SpaceSeq;
23 struct StripElem;
24 struct View2D;
25 struct bContext;
26 struct rctf;
27 struct wmOperator;
28 struct ScrArea;
29 struct Editing;
30 struct ListBase;
31 
32 #define DEFAULT_IMG_STRIP_LENGTH 25 /* XXX arbitrary but ok for now. */
33 #define OVERLAP_ALPHA 180
34 
35 typedef struct SeqChannelDrawContext {
36  const struct bContext *C;
37  struct ScrArea *area;
38  struct ARegion *region;
40  struct View2D *v2d;
42 
43  struct Scene *scene;
44  struct Editing *ed;
45  struct ListBase *seqbase; /* Displayed seqbase. */
46  struct ListBase *channels; /* Displayed channels. */
47 
48  float draw_offset;
50  float frame_width;
51  float scale;
53 
54 /* sequencer_draw.c */
55 
56 void draw_timeline_seq(const struct bContext *C, struct ARegion *region);
57 void draw_timeline_seq_display(const struct bContext *C, struct ARegion *region);
58 void sequencer_draw_preview(const struct bContext *C,
59  struct Scene *scene,
60  struct ARegion *region,
61  struct SpaceSeq *sseq,
62  int timeline_frame,
63  int offset,
64  bool draw_overlay,
65  bool draw_backdrop);
66 void color3ubv_from_seq(const struct Scene *curscene,
67  const struct Sequence *seq,
68  bool show_strip_color_tag,
69  uchar r_col[3]);
70 
72 /* Get handle width in 2d-View space. */
74  struct Sequence *seq,
75  float pixelx);
76 
77 /* UNUSED */
78 /* void seq_reset_imageofs(struct SpaceSeq *sseq); */
79 
87 struct ImBuf *sequencer_ibuf_get(struct Main *bmain,
88  struct ARegion *region,
89  struct Depsgraph *depsgraph,
90  struct Scene *scene,
91  struct SpaceSeq *sseq,
92  int timeline_frame,
93  int frame_ofs,
94  const char *viewname);
95 
96 /* sequencer_thumbnails.c */
97 
100  const struct bContext *C,
101  struct Scene *scene,
102  struct Sequence *seq,
103  float y1,
104  float y2,
105  float pixelx,
106  float pixely);
107 
108 /* sequencer_draw_channels.c */
109 
110 void draw_channels(const struct bContext *C, struct ARegion *region);
112  struct ARegion *region,
113  struct SeqChannelDrawContext *r_context);
114 
115 /* sequencer_edit.c */
116 
117 struct View2D;
118 void seq_rectf(const struct Scene *scene, struct Sequence *seq, struct rctf *rectf);
119 struct Sequence *find_nearest_seq(struct Scene *scene,
120  struct View2D *v2d,
121  int *hand,
122  const int mval[2]);
124  struct Sequence *test,
125  int lr,
126  int sel);
127 void recurs_sel_seq(struct Sequence *seq_meta);
129  struct Sequence *activeseq,
130  int type,
131  struct Sequence **r_selseq1,
132  struct Sequence **r_selseq2,
133  struct Sequence **r_selseq3,
134  const char **r_error_str);
135 
136 /* Operator helpers. */
137 bool sequencer_edit_poll(struct bContext *C);
139 /* UNUSED */
140 /* bool sequencer_strip_poll(struct bContext *C); */
145 
154 
164 
165 /* Externs. */
168 
169 /* Operators. */
170 struct wmKeyConfig;
171 struct wmOperatorType;
172 
173 void SEQUENCER_OT_split(struct wmOperatorType *ot);
174 void SEQUENCER_OT_slip(struct wmOperatorType *ot);
175 void SEQUENCER_OT_mute(struct wmOperatorType *ot);
177 void SEQUENCER_OT_lock(struct wmOperatorType *ot);
190 
193 void SEQUENCER_OT_snap(struct wmOperatorType *ot);
194 
196 void SEQUENCER_OT_swap(struct wmOperatorType *ot);
199 
204 
205 void SEQUENCER_OT_copy(struct wmOperatorType *ot);
206 void SEQUENCER_OT_paste(struct wmOperatorType *ot);
207 
210 
212 
216 
219 
220 /* sequencer_select.c */
221 
234 
235 /* sequencer_add.c */
236 
245 
246 /* sequencer_drag_drop.c */
247 
248 void sequencer_dropboxes(void);
249 
250 /* sequencer_ops.c */
251 
252 void sequencer_operatortypes(void);
253 void sequencer_keymap(struct wmKeyConfig *keyconf);
254 
255 /* sequencer_scope.c */
256 
257 struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf *ibuf);
258 struct ImBuf *make_sep_waveform_view_from_ibuf(struct ImBuf *ibuf);
259 struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf *ibuf);
260 struct ImBuf *make_zebra_view_from_ibuf(struct ImBuf *ibuf, float perc);
261 struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf *ibuf);
262 
263 /* sequencer_buttons.c */
264 
265 void sequencer_buttons_register(struct ARegionType *art);
266 
267 /* sequencer_modifiers.c */
268 
273 
274 /* sequencer_view.c */
275 
283 
284 /* sequencer_channels_edit.c */
285 
287 
288 /* sequencer_preview.c */
289 
290 void sequencer_preview_add_sound(const struct bContext *C, struct Sequence *seq);
291 
292 /* sequencer_add.c */
293 
295  int sfra,
296  int *r_minframe,
297  int *r_numdigits);
299  struct wmOperator *op, struct StripElem *se, int len, int minframe, int numdigits);
unsigned char uchar
Definition: BLI_sys_types.h:70
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
#define C
Definition: RandGen.cpp:25
Scene scene
const Depsgraph * depsgraph
int len
Definition: draw_manager.c:108
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)
Definition: ed_draw.c:208
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void sequencer_image_seq_reserve_frames(struct wmOperator *op, struct StripElem *se, int len, int minframe, int numdigits)
void SEQUENCER_OT_cursor_set(struct wmOperatorType *ot)
void seq_rectf(const struct Scene *scene, struct Sequence *seq, struct rctf *rectf)
bool sequencer_view_preview_only_poll(const struct bContext *C)
void SEQUENCER_OT_copy(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_color_tag_set(struct wmOperatorType *ot)
void SEQUENCER_OT_meta_make(struct wmOperatorType *ot)
void SEQUENCER_OT_unmute(struct wmOperatorType *ot)
void SEQUENCER_OT_snap(struct wmOperatorType *ot)
void SEQUENCER_OT_select_handles(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_remove(struct wmOperatorType *ot)
EnumPropertyItem sequencer_prop_effect_types[]
void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot)
void SEQUENCER_OT_select_linked_pick(struct wmOperatorType *ot)
bool sequencer_edit_poll(struct bContext *C)
void SEQUENCER_OT_gap_insert(struct wmOperatorType *ot)
void last_displayed_thumbnails_list_free(void *val)
void SEQUENCER_OT_images_separate(struct wmOperatorType *ot)
struct SeqChannelDrawContext SeqChannelDrawContext
void sequencer_dropboxes(void)
void SEQUENCER_OT_view_frame(struct wmOperatorType *ot)
void SEQUENCER_OT_select_side_of_frame(struct wmOperatorType *ot)
void SEQUENCER_OT_mute(struct wmOperatorType *ot)
void SEQUENCER_OT_view_all(struct wmOperatorType *ot)
int sequencer_image_seq_get_minmax_frame(struct wmOperator *op, int sfra, int *r_minframe, int *r_numdigits)
bool sequencer_editing_initialized_and_active(struct bContext *C)
void SEQUENCER_OT_duplicate(struct wmOperatorType *ot)
void SEQUENCER_OT_export_subtitles(struct wmOperatorType *ot)
void SEQUENCER_OT_select_more(struct wmOperatorType *ot)
void sequencer_special_update_set(Sequence *seq)
void sequencer_operatortypes(void)
Definition: sequencer_ops.c:22
void SEQUENCER_OT_meta_separate(struct wmOperatorType *ot)
bool sequencer_strip_has_path_poll(struct bContext *C)
void SEQUENCER_OT_select_less(struct wmOperatorType *ot)
void SEQUENCER_OT_mask_strip_add(struct wmOperatorType *ot)
void sequencer_buttons_register(struct ARegionType *art)
void SEQUENCER_OT_slip(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_clear(struct wmOperatorType *ot)
float sequence_handle_size_get_clamped(const struct Scene *scene, struct Sequence *seq, float pixelx)
void SEQUENCER_OT_swap_data(struct wmOperatorType *ot)
void SEQUENCER_OT_view_all_preview(struct wmOperatorType *ot)
void SEQUENCER_OT_rename_channel(struct wmOperatorType *ot)
struct ImBuf * make_vectorscope_view_from_ibuf(struct ImBuf *ibuf)
void SEQUENCER_OT_scene_strip_add_new(struct wmOperatorType *ot)
void color3ubv_from_seq(const struct Scene *curscene, const struct Sequence *seq, bool show_strip_color_tag, uchar r_col[3])
EnumPropertyItem prop_side_types[]
bool sequencer_view_has_preview_poll(struct bContext *C)
int seq_effect_find_selected(struct Scene *scene, struct Sequence *activeseq, int type, struct Sequence **r_selseq1, struct Sequence **r_selseq2, struct Sequence **r_selseq3, const char **r_error_str)
struct SeqCollection * selected_strips_from_context(struct bContext *C)
void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
void SEQUENCER_OT_gap_remove(struct wmOperatorType *ot)
struct ImBuf * make_waveform_view_from_ibuf(struct ImBuf *ibuf)
struct SeqCollection * all_strips_from_context(struct bContext *C)
void SEQUENCER_OT_split(struct wmOperatorType *ot)
void SEQUENCER_OT_delete(struct wmOperatorType *ot)
void SEQUENCER_OT_view_ghost_border(struct wmOperatorType *ot)
struct ImBuf * make_histogram_view_from_ibuf(struct ImBuf *ibuf)
void sequencer_keymap(struct wmKeyConfig *keyconf)
struct ImBuf * sequencer_ibuf_get(struct Main *bmain, struct ARegion *region, struct Depsgraph *depsgraph, struct Scene *scene, struct SpaceSeq *sseq, int timeline_frame, int frame_ofs, const char *viewname)
void SEQUENCER_OT_unlock(struct wmOperatorType *ot)
void SEQUENCER_OT_offset_clear(struct wmOperatorType *ot)
void SEQUENCER_OT_select_all(struct wmOperatorType *ot)
void draw_channels(const struct bContext *C, struct ARegion *region)
struct Sequence * find_neighboring_sequence(struct Scene *scene, struct Sequence *test, int lr, int sel)
void SEQUENCER_OT_set_range_to_strips(struct wmOperatorType *ot)
void SEQUENCER_OT_lock(struct wmOperatorType *ot)
void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_swap(struct wmOperatorType *ot)
void sequencer_preview_add_sound(const struct bContext *C, struct Sequence *seq)
void draw_timeline_seq_display(const struct bContext *C, struct ARegion *region)
void SEQUENCER_OT_view_selected(struct wmOperatorType *ot)
void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_jump(struct wmOperatorType *ot)
void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot)
void SEQUENCER_OT_select_grouped(struct wmOperatorType *ot)
void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_select(struct wmOperatorType *ot)
void channel_draw_context_init(const struct bContext *C, struct ARegion *region, struct SeqChannelDrawContext *r_context)
void SEQUENCER_OT_sample(struct wmOperatorType *ot)
void SEQUENCER_OT_meta_toggle(struct wmOperatorType *ot)
void SEQUENCER_OT_paste(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_add(struct wmOperatorType *ot)
void draw_timeline_seq(const struct bContext *C, struct ARegion *region)
void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot)
void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot)
void SEQUENCER_OT_change_path(struct wmOperatorType *ot)
struct ImBuf * make_sep_waveform_view_from_ibuf(struct ImBuf *ibuf)
void SEQUENCER_OT_change_scene(struct wmOperatorType *ot)
void SEQUENCER_OT_rebuild_proxy(struct wmOperatorType *ot)
void SEQUENCER_OT_select_box(struct wmOperatorType *ot)
void SEQUENCER_OT_select_side(struct wmOperatorType *ot)
void SEQUENCER_OT_select_linked(struct wmOperatorType *ot)
void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_enable_proxies(struct wmOperatorType *ot)
void sequencer_draw_preview(const struct bContext *C, struct Scene *scene, struct ARegion *region, struct SpaceSeq *sseq, int timeline_frame, int offset, bool draw_overlay, bool draw_backdrop)
void SEQUENCER_OT_rendersize(struct wmOperatorType *ot)
struct ImBuf * make_zebra_view_from_ibuf(struct ImBuf *ibuf, float perc)
void recurs_sel_seq(struct Sequence *seq_meta)
void SEQUENCER_OT_strip_modifier_move(struct wmOperatorType *ot)
bool sequencer_view_strips_poll(struct bContext *C)
void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_transform_fit(struct wmOperatorType *ot)
void SEQUENCER_OT_view_zoom_ratio(struct wmOperatorType *ot)
void SEQUENCER_OT_strip_modifier_copy(struct wmOperatorType *ot)
struct Sequence * find_nearest_seq(struct Scene *scene, struct View2D *v2d, int *hand, const int mval[2])
void draw_seq_strip_thumbnail(struct View2D *v2d, const struct bContext *C, struct Scene *scene, struct Sequence *seq, float y1, float y2, float pixelx, float pixely)
void SEQUENCER_OT_reload(struct wmOperatorType *ot)
void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot)
Definition: BKE_main.h:121
struct View2D * timeline_region_v2d
struct ARegion * timeline_region
struct ARegion * region
struct Editing * ed
struct ScrArea * area
const struct bContext * C
struct ListBase * channels
struct ListBase * seqbase
wmOperatorType * ot
Definition: wm_files.c:3479