66 sseq->
runtime->scopes.reference_ibuf =
nullptr;
77 if (region->regiontype == type) {
91 sseq = MEM_cnew<SpaceSeq>(
"initsequencer");
107 region = MEM_cnew<ARegion>(
"header for sequencer");
114 region = MEM_cnew<ARegion>(
"tool header for sequencer");
122 region = MEM_cnew<ARegion>(
"buttons for sequencer");
130 region = MEM_cnew<ARegion>(
"tools for sequencer");
137 region = MEM_cnew<ARegion>(
"channels for sequencer");
146 region = MEM_cnew<ARegion>(
"preview region for sequencer");
152 region->v2d.minzoom = 0.001f;
153 region->v2d.maxzoom = 1000.0f;
154 region->v2d.tot.xmin = -960.0f;
155 region->v2d.tot.ymin = -540.0f;
156 region->v2d.tot.xmax = 960.0f;
157 region->v2d.tot.ymax = 540.0f;
158 region->v2d.min[0] = 0.0f;
159 region->v2d.min[1] = 0.0f;
160 region->v2d.max[0] = 12000.0f;
161 region->v2d.max[1] = 12000.0f;
162 region->v2d.cur = region->v2d.tot;
167 region = MEM_cnew<ARegion>(
"main region for sequencer");
173 region->v2d.tot.xmin = 0.0f;
174 region->v2d.tot.ymin = 0.0f;
175 region->v2d.tot.xmax = scene->r.efra;
176 region->v2d.tot.ymax = 8.5f;
178 region->v2d.cur = region->v2d.tot;
180 region->v2d.min[0] = 10.0f;
181 region->v2d.min[1] = 1.0f;
186 region->v2d.minzoom = 0.01f;
187 region->v2d.maxzoom = 100.0f;
191 region->v2d.keepzoom = 0;
192 region->v2d.keeptot = 0;
216 if (sseq->
runtime ==
nullptr) {
217 sseq->
runtime = MEM_new<SpaceSeq_Runtime>(__func__);
228 bool view_changed =
false;
230 switch (sseq->
view) {
261 if (region_preview->
sizey < 10 || region_main->
sizey < 10 ||
262 region_preview->
sizey + region_main->
sizey > height)
264 region_preview->
sizey = roundf(height * 0.4f);
283 sseqn->
runtime = MEM_new<SpaceSeq_Runtime>(__func__);
353 gzgt->
name =
"Sequencer Transform Gizmo";
354 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d";
367 gzgt->
name =
"Sequencer Translate Gizmo";
368 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d_translate";
381 gzgt->
name =
"Sequencer Transform Gizmo Resize";
382 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d_resize";
395 gzgt->
name =
"Sequencer Transform Gizmo Resize";
396 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d_rotate";
473 View2D *v2d = ®ion->v2d;
493 float pad_top, pad_bottom;
499 if (bottom_channel_padding < 1.0f) {
501 bottom_channel_padding = 1.0f;
504 strip_boundbox.
ymax += 1.0f + pad_top * pixel_view_size_y;
505 strip_boundbox.
ymin -= bottom_channel_padding;
513 if (view_clamped.
ymax > strip_boundbox.
ymax) {
514 view_clamped.
ymax = strip_boundbox.
ymax;
517 else if (view_clamped.
ymin < strip_boundbox.
ymin) {
518 view_clamped.
ymin = strip_boundbox.
ymin;
522 v2d->
cur = view_clamped;
528 View2D *v2d = ®ion->v2d;
601 msg_sub_value_region_tag_redraw.
owner = region;
602 msg_sub_value_region_tag_redraw.user_data = region;
609 use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start,
610 use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end,
611 &rna_Scene_use_preview_range,
612 &rna_Scene_frame_current,
629 &RNA_SequenceTransform,
630 &RNA_SequenceModifier,
631 &RNA_SequenceColorBalanceData,
634 for (
int i = 0; i <
ARRAY_SIZE(type_array); i++) {
635 msg_key_params.
ptr.
type = type_array[i];
637 mbus, &msg_key_params, &msg_sub_value_region_tag_redraw, __func__);
646 float mouse_co_region[2])
668 rcti scrub_rect = region->winrct;
682 float mouse_co_view[2];
684 ®ion->v2d, mouse_co_region[0], mouse_co_region[1], &mouse_co_view[0], &mouse_co_view[1]);
695 scene, ®ion->v2d, mouse_co_view);
697 if (selection.seq1 ==
nullptr) {
707 const View2D *v2d = ®ion->v2d;
715 if (selection.seq1 !=
nullptr && selection.seq2 !=
nullptr) {
806 View2D *v2d = ®ion->v2d;
814 sseq->
flag &= ~SEQ_ZOOM_TO_FIT;
838 const bool draw_frame_overlay = (scene->ed &&
851 over_cfra = scene->ed->overlay_frame_abs;
854 over_cfra = scene->r.cfra + scene->ed->overlay_frame_ofs;
860 C, scene, region, sseq, scene->r.cfra, over_cfra - scene->r.cfra,
true,
false);
870 float cursor_pixel[2];
882 int xoffset = rect->
xmin +
U.widget_unit;
883 int yoffset = rect->
ymax;
889 float text_color[4] = {1, 1, 1, 1}, shadow_color[4] = {0, 0, 0, 0.8f};
1073 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
1077 STRNCPY(st->name,
"Sequencer");
1093 st->blend_read_after_liblink =
nullptr;
1098 art = MEM_cnew<ARegionType>(
"spacetype sequencer region");
1116 art = MEM_cnew<ARegionType>(
"spacetype sequencer region");
1129 art = MEM_cnew<ARegionType>(
"spacetype sequencer region");
1141 art = MEM_cnew<ARegionType>(
"spacetype sequencer tools region");
1154 art = MEM_cnew<ARegionType>(
"spacetype sequencer channels");
1165 art = MEM_cnew<ARegionType>(
"spacetype sequencer tool header region");
1176 art = MEM_cnew<ARegionType>(
"spacetype sequencer region");
1193 if (
G.background == 0) {
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
bool CTX_data_equals(const char *member, const char *str)
bool CTX_data_dir(const char *member)
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
@ CTX_RESULT_MEMBER_NOT_FOUND
Scene * CTX_data_scene(const bContext *C)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_gpencil_free_data(struct bGPdata *gpd, bool free_all)
void BKE_gpencil_blend_read_data(struct BlendDataReader *reader, struct bGPdata *gpd)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_DIRECT_WEAK_LINK
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
SequencerDrawView sequencer_view3d_fn
struct ImBuf *(* SequencerDrawView)(struct Depsgraph *depsgraph, struct Scene *scene, struct View3DShading *shading_override, eDrawType drawtype, struct Object *camera, int width, int height, enum eImBufFlags flag, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, struct GPUOffScreen *ofs, struct GPUViewport *viewport, char err_out[256])
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
void BLF_color4fv(int fontid, const float rgba[4])
void BLF_shadow_offset(int fontid, int x, int y)
void BLF_disable(int fontid, int option)
void BLF_enable(int fontid, int option)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2])
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define STRNCPY(dst, src)
#define BLO_write_struct(writer, struct_name, data_ptr)
@ RGN_FLAG_HIDDEN_BY_USER
@ SEQ_EDIT_OVERLAY_FRAME_ABS
@ SEQ_EDIT_OVERLAY_FRAME_SHOW
@ SEQ_TIMELINE_SHOW_FCURVES
@ SEQ_TIMELINE_SHOW_STRIP_DURATION
@ SEQ_TIMELINE_SHOW_THUMBNAILS
@ SEQ_TIMELINE_SHOW_STRIP_RETIMING
@ SEQ_TIMELINE_WAVEFORMS_HALF
@ SEQ_TIMELINE_SHOW_STRIP_SOURCE
@ SEQ_TIMELINE_SHOW_STRIP_NAME
@ SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG
@ SEQ_VIEW_SEQUENCE_PREVIEW
@ SEQ_PREVIEW_SHOW_GPENCIL
@ SEQ_PREVIEW_SHOW_OUTLINE_SELECTED
@ SEQ_PREVIEW_SHOW_2D_CURSOR
@ SEQ_DRAW_TRANSFORM_PREVIEW
@ SEQ_OVERLAY_FRAME_TYPE_RECT
@ SEQ_OVERLAY_FRAME_TYPE_CURRENT
@ SEQ_OVERLAY_FRAME_TYPE_REFERENCE
@ SEQ_CACHE_SHOW_FINAL_OUT
@ USER_SEQ_ED_SIMPLE_TWEAKING
@ V2D_VIEWSYNC_AREA_VERTICAL
@ V2D_SCROLL_VERTICAL_HIDE
@ V2D_SCROLL_VERTICAL_HANDLES
@ V2D_SCROLL_HORIZONTAL_HANDLES
void DRW_draw_cursor_2d_ex(const ARegion *region, const float cursor[2])
void ED_area_do_mgs_subscribe_for_tool_header(const wmRegionMessageSubscribeParams *params)
void ED_area_tag_redraw(ScrArea *area)
ARegionType * ED_area_type_hud(int space_type)
void ED_area_do_mgs_subscribe_for_tool_ui(const wmRegionMessageSubscribeParams *params)
void ED_region_panels(const bContext *C, ARegion *region)
void ED_region_header(const bContext *C, ARegion *region)
const rcti * ED_region_visible_rect(ARegion *region)
void ED_region_header_init(ARegion *region)
bScreen * ED_screen_animation_no_scrub(const wmWindowManager *wm)
int ED_region_generic_tools_region_snap_size(const ARegion *region, int size, int axis)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
void ED_region_generic_tools_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
void ED_region_tag_redraw(ARegion *region)
void ED_region_do_msg_notify_tag_redraw(bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
void ED_area_init(wmWindowManager *wm, wmWindow *win, ScrArea *area)
void ED_region_panels_ex(const bContext *C, ARegion *region, wmOperatorCallContext op_context, const char *contexts[])
StripSelection ED_sequencer_pick_strip_and_handle(const struct Scene *scene, const View2D *v2d, float mouse_co[2])
bool ED_sequencer_can_select_handle(const Scene *scene, const Sequence *seq, const View2D *v2d)
void ED_spacetype_sequencer()
void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset)
ImBuf * ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, Scene *scene, View3DShading *shading_override, eDrawType drawtype, Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256])
void GPU_depth_mask(bool depth)
void GPU_color_mask(bool r, bool g, bool b, bool a)
void GPU_depth_test(eGPUDepthTest test)
Read Guarded memory(de)allocation.
constexpr int SEQ_MAX_CHANNELS
#define UI_SIDEBAR_PANEL_WIDTH
#define UI_COMPACT_PANEL_WIDTH
void UI_panel_category_active_set_default(ARegion *region, const char *idname)
#define UI_MARKER_MARGIN_Y
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
void VIEW2D_GGT_navigate_impl(wmGizmoGroupType *gzgt, const char *idname)
#define UI_TIME_SCRUB_MARGIN_Y
float UI_view2d_scale_get_y(const View2D *v2d)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
@ WM_GIZMOMAP_DRAWSTEP_2D
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK
#define ND_SPACE_SEQUENCER
#define ND_GPENCIL_EDITMODE
#define ND_RENDER_OPTIONS
@ WM_OP_INVOKE_REGION_WIN
@ WM_OP_INVOKE_REGION_PREVIEW
@ WM_OP_INVOKE_REGION_CHANNELS
#define ND_DRAW_RENDER_VIEWPORT
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer)
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void *(* MEM_dupallocN)(const void *vmemh)
static void * newdataadr(FileData *fd, const void *adr)
PointerRNA RNA_id_pointer_create(ID *id)
Mask * SEQ_active_mask_get(Scene *scene)
Editing * SEQ_editing_get(const Scene *scene)
void draw_channels(const bContext *C, ARegion *region)
void sequencer_dropboxes()
void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom)
void draw_timeline_seq_display(const bContext *C, ARegion *region)
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_keymap(wmKeyConfig *keyconf)
void draw_timeline_seq(const bContext *C, ARegion *region)
bool retiming_keys_can_be_displayed(const SpaceSeq *sseq)
rctf seq_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Sequence *seq)
void sequencer_operatortypes()
static void sequencer_main_region_view2d_changed(const bContext *C, ARegion *region)
static void sequencer_channel_region_init(wmWindowManager *wm, ARegion *region)
static bool is_mouse_over_retiming_key(const Scene *scene, const Sequence *seq, const View2D *v2d, const ScrArea *area, float mouse_co_region[2])
static void SEQUENCER_GGT_gizmo2d(wmGizmoGroupType *gzgt)
static void sequencer_preview_region_listener(const wmRegionListenerParams *params)
static SpaceLink * sequencer_duplicate(SpaceLink *sl)
static bool sequencer_channel_region_poll(const RegionPollParams *params)
static void SEQUENCER_GGT_gizmo2d_rotate(wmGizmoGroupType *gzgt)
static void sequencer_listener(const wmSpaceTypeListenerParams *params)
static void sequencer_main_region_layout(const bContext *C, ARegion *region)
static void sequencer_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static void sequencer_main_region_init(wmWindowManager *wm, ARegion *region)
const char * sequencer_context_dir[]
static SpaceLink * sequencer_create(const ScrArea *, const Scene *scene)
static bool sequencer_preview_region_poll(const RegionPollParams *params)
static void sequencer_preview_region_layout(const bContext *C, ARegion *region)
static void sequencer_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
static void sequencer_init(wmWindowManager *, ScrArea *area)
static void sequencer_main_region_listener(const wmRegionListenerParams *params)
static void sequencer_preview_region_draw(const bContext *C, ARegion *region)
static void sequencer_header_region_draw(const bContext *C, ARegion *region)
static void sequencer_preview_region_view2d_changed(const bContext *C, ARegion *)
static void sequencer_main_region_draw_overlay(const bContext *C, ARegion *region)
static void sequencer_free(SpaceLink *sl)
static void sequencer_buttons_region_listener(const wmRegionListenerParams *params)
static void sequencer_main_clamp_view(const bContext *C, ARegion *region)
static ARegion * sequencer_find_region(ScrArea *area, short type)
static void sequencer_channel_region_draw(const bContext *C, ARegion *region)
static void sequencer_preview_region_init(wmWindowManager *wm, ARegion *region)
static void SEQUENCER_GGT_gizmo2d_resize(wmGizmoGroupType *gzgt)
static void sequencer_main_region_draw(const bContext *C, ARegion *region)
static void SEQUENCER_GGT_gizmo2d_translate(wmGizmoGroupType *gzgt)
static void sequencer_scopes_tag_refresh(ScrArea *area)
static void sequencer_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void sequencer_buttons_region_draw(const bContext *C, ARegion *region)
static void sequencer_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static void sequencer_gizmos()
static void sequencer_refresh(const bContext *C, ScrArea *area)
static void sequencer_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
static int sequencer_context(const bContext *C, const char *member, bContextDataResult *result)
static void SEQUENCER_GGT_navigate(wmGizmoGroupType *gzgt)
static bool sequencer_main_region_poll(const RegionPollParams *params)
static void sequencer_header_region_init(wmWindowManager *, ARegion *region)
static void sequencer_buttons_region_init(wmWindowManager *wm, ARegion *region)
static void sequencer_main_region_clamp_custom_set(const bContext *C, ARegion *region)
static void sequencer_tools_region_draw(const bContext *C, ARegion *region)
static void sequencer_main_cursor(wmWindow *win, ScrArea *area, ARegion *region)
static void sequencer_tools_region_init(wmWindowManager *wm, ARegion *region)
bool SEQ_retiming_data_is_editable(const Sequence *seq)
void SEQ_timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
void SEQ_timeline_init_boundbox(const Scene *scene, rctf *r_rect)
bool(* poll)(const RegionPollParams *params)
bool clip_gizmo_events_by_ui
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
void(* cursor)(wmWindow *win, ScrArea *area, ARegion *region)
void(* listener)(const wmRegionListenerParams *params)
void(* on_view2d_changed)(const bContext *C, ARegion *region)
void(* draw)(const bContext *C, ARegion *region)
void(* layout)(const bContext *C, ARegion *region)
void(* draw_overlay)(const bContext *C, ARegion *region)
int(* snap_size)(const ARegion *region, int size, int axis)
void(* init)(wmWindowManager *wm, ARegion *region)
struct SequencerCacheOverlay cache_overlay
struct SequencerTimelineOverlay timeline_overlay
SpaceSeq_Runtime * runtime
struct SequencerPreviewOverlay preview_overlay
struct wmTimer * smooth_timer
float timeline_clamp_custom_range
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
struct wmKeyConfig * defaultconf
struct wmEvent * eventstate
void WM_cursor_set(wmWindow *win, int curs)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmGizmoGroupType * WM_gizmogrouptype_append(void(*wtfunc)(wmGizmoGroupType *))
wmGizmoGroupTypeRef * WM_gizmogrouptype_append_and_link(wmGizmoMapType *gzmap_type, void(*wtfunc)(wmGizmoGroupType *))
void WM_gizmomap_tag_refresh(wmGizmoMap *gzmap)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
wmGizmoMapType * WM_gizmomaptype_ensure(const wmGizmoMapType_Params *gzmap_params)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void WM_msg_subscribe_rna_params(wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void WM_msg_subscribe_rna(wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)