76SpaceSeq_Runtime::~SpaceSeq_Runtime() =
default;
84 if (region->regiontype == type) {
165 region->
v2d.
min[0] = 0.0f;
166 region->
v2d.
min[1] = 0.0f;
167 region->
v2d.
max[0] = 12000.0f;
168 region->
v2d.
max[1] = 12000.0f;
187 region->
v2d.
min[0] = 10.0f;
188 region->
v2d.
min[1] = 1.0f;
224 if (sseq->
runtime ==
nullptr) {
225 sseq->
runtime = MEM_new<SpaceSeq_Runtime>(__func__);
235 bool view_changed =
false;
237 switch (sseq->
view) {
259 region_main->
sizey = int(height - region_preview->
sizey);
260 region_preview->
sizey = int(height - region_main->
sizey);
268 if (region_preview->
sizey < 10 || region_main->
sizey < 10 ||
269 region_preview->
sizey + region_main->
sizey > height)
271 region_preview->
sizey = roundf(height * 0.4f);
272 region_main->
sizey = int(height - region_preview->
sizey);
290 sseqn->
runtime = MEM_new<SpaceSeq_Runtime>(__func__);
360 gzgt->
name =
"Sequencer Transform Gizmo";
361 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d";
374 gzgt->
name =
"Sequencer Translate Gizmo";
375 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d_translate";
388 gzgt->
name =
"Sequencer Transform Gizmo Resize";
389 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d_resize";
402 gzgt->
name =
"Sequencer Transform Gizmo Resize";
403 gzgt->
idname =
"SEQUENCER_GGT_gizmo2d_rotate";
501 float pad_top, pad_bottom;
507 bottom_channel_padding = std::max(bottom_channel_padding, 1.0f);
509 strip_boundbox.
ymax += 1.0f + pad_top * pixel_view_size_y;
510 strip_boundbox.
ymin -= bottom_channel_padding;
518 if (view_clamped.
ymax > strip_boundbox.
ymax) {
519 view_clamped.
ymax = strip_boundbox.
ymax;
522 else if (view_clamped.
ymin < strip_boundbox.
ymin) {
523 view_clamped.
ymin = strip_boundbox.
ymin;
527 v2d->
cur = view_clamped;
606 msg_sub_value_region_tag_redraw.
owner = region;
607 msg_sub_value_region_tag_redraw.
user_data = region;
614 use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start,
615 use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end,
616 &rna_Scene_use_preview_range,
617 &rna_Scene_frame_current,
636 &RNA_StripColorBalanceData,
640 msg_key_params.
ptr.
type = type_array[
i];
642 mbus, &msg_key_params, &msg_sub_value_region_tag_redraw, __func__);
651 float mouse_co_region[2])
671 if (tref ==
nullptr || scene ==
nullptr ||
ed ==
nullptr) {
696 float mouse_co_view[2];
698 ®ion->
v2d, mouse_co_region[0], mouse_co_region[1], &mouse_co_view[0], &mouse_co_view[1]);
701 int mval[2] = {int(mouse_co_region[0]), int(mouse_co_region[1])};
703 if (strip !=
nullptr) {
726 if (selection.
strip1 ==
nullptr) {
741 if (selection.
strip1 !=
nullptr && selection.
strip2 !=
nullptr) {
1025 switch (wmn->
data) {
1113 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
1117 STRNCPY(st->name,
"Sequencer");
1133 st->blend_read_after_liblink =
nullptr;
1232 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)
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)
ARegion * BKE_area_region_new()
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
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)
char * STRNCPY(char(&dst)[N], const char *src)
#define BLO_write_struct(writer, struct_name, data_ptr)
@ RGN_FLAG_HIDDEN_BY_USER
@ 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_DRAW_TRANSFORM_PREVIEW
@ SEQ_CACHE_SHOW_FINAL_OUT
@ USER_SEQ_ED_SIMPLE_TWEAKING
@ V2D_SCROLL_VERTICAL_HIDE
@ V2D_SCROLL_VERTICAL_HANDLES
@ V2D_SCROLL_HORIZONTAL_HANDLES
@ V2D_ZOOM_IGNORE_KEEPOFS
@ V2D_VIEWSYNC_AREA_VERTICAL
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_init(bContext *C, const wmWindow *win, ScrArea *area)
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)
void ED_region_header_init(ARegion *region)
int ED_region_generic_tools_region_snap_size(const ARegion *region, int size, int axis)
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_region_panels_ex(const bContext *C, ARegion *region, wmOperatorCallContext op_context, const char *contexts[])
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])
Read Guarded memory(de)allocation.
#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
char char UI_view2d_mouse_in_scrollers(const ARegion *region, const View2D *v2d, const int xy[2]) ATTR_NONNULL(1
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
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
@ 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_BONE_COLLECTION
#define ND_DRAW_RENDER_VIEWPORT
BMesh const char void * data
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
static void sequencer_main_region_clamp_custom_set(const bContext *C, ARegion *region)
static bool sequencer_main_region_poll(const RegionPollParams *params)
static void sequencer_main_region_layout(const bContext *C, ARegion *region)
static void sequencer_channel_region_init(wmWindowManager *wm, ARegion *region)
static int sequencer_context(const bContext *C, const char *member, bContextDataResult *result)
static void sequencer_header_region_draw(const bContext *C, ARegion *region)
static SpaceLink * sequencer_duplicate(SpaceLink *sl)
static void sequencer_preview_region_init(wmWindowManager *wm, ARegion *region)
static bool is_mouse_over_retiming_key(const Scene *scene, const Strip *strip, const View2D *v2d, const ScrArea *area, float mouse_co_region[2])
StripSelection pick_strip_and_handle(const struct Scene *scene, const View2D *v2d, float mouse_co[2])
static void sequencer_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
static void sequencer_init(wmWindowManager *, ScrArea *area)
void sequencer_dropboxes()
static void sequencer_tools_region_draw(const bContext *C, ARegion *region)
static void SEQUENCER_GGT_gizmo2d(wmGizmoGroupType *gzgt)
static void sequencer_main_region_init(wmWindowManager *wm, ARegion *region)
static void sequencer_main_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
static void sequencer_main_clamp_view(const bContext *C, ARegion *region)
static void sequencer_buttons_region_listener(const wmRegionListenerParams *params)
static void sequencer_main_region_draw(const bContext *C, ARegion *region)
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)
static void sequencer_space_blend_write(BlendWriter *writer, SpaceLink *sl)
void sequencer_preview_region_draw(const bContext *C, ARegion *region)
static bool sequencer_preview_region_poll(const RegionPollParams *params)
const char * sequencer_context_dir[]
static bool sequencer_channel_region_poll(const RegionPollParams *params)
static void sequencer_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
static void sequencer_scopes_tag_refresh(ScrArea *area)
static SpaceLink * sequencer_create(const ScrArea *, const Scene *scene)
static void sequencer_main_region_listener(const wmRegionListenerParams *params)
Strip * strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2])
static void sequencer_refresh(const bContext *C, ScrArea *area)
bool can_select_handle(const Scene *scene, const Strip *strip, const View2D *v2d)
rctf strip_retiming_keys_box_get(const Scene *scene, const View2D *v2d, const Strip *strip)
static ARegion * sequencer_find_region(ScrArea *area, short type)
bool retiming_keys_can_be_displayed(const SpaceSeq *sseq)
static void sequencer_listener(const wmSpaceTypeListenerParams *params)
static void SEQUENCER_GGT_gizmo2d_translate(wmGizmoGroupType *gzgt)
static void sequencer_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
void sequencer_operatortypes()
static void SEQUENCER_GGT_gizmo2d_resize(wmGizmoGroupType *gzgt)
static void sequencer_gizmos()
void draw_timeline_seq_display(const bContext *C, ARegion *region)
static void sequencer_channel_region_draw(const bContext *C, ARegion *region)
static void SEQUENCER_GGT_navigate(wmGizmoGroupType *gzgt)
static void sequencer_header_region_init(wmWindowManager *, ARegion *region)
static void sequencer_preview_region_layout(const bContext *C, ARegion *region)
static void sequencer_free(SpaceLink *sl)
void draw_channels(const bContext *C, ARegion *region)
static void sequencer_main_cursor(wmWindow *win, ScrArea *area, ARegion *region)
static void sequencer_buttons_region_init(wmWindowManager *wm, ARegion *region)
void sequencer_buttons_register(ARegionType *art)
static void sequencer_tools_region_init(wmWindowManager *wm, ARegion *region)
void ED_spacetype_sequencer()
static void sequencer_buttons_region_draw(const bContext *C, ARegion *region)
static void SEQUENCER_GGT_gizmo2d_rotate(wmGizmoGroupType *gzgt)
static void sequencer_preview_region_listener(const wmRegionListenerParams *params)
static void sequencer_main_region_draw_overlay(const bContext *C, ARegion *region)
static void sequencer_preview_region_view2d_changed(const bContext *C, ARegion *)
void sequencer_keymap(wmKeyConfig *keyconf)
static void sequencer_main_region_view2d_changed(const bContext *C, ARegion *region)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
ListBase * channels_displayed_get(const Editing *ed)
Editing * editing_get(const Scene *scene)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
constexpr int MAX_CHANNELS
void timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
struct ImBuf *(*)(struct Depsgraph *, struct Scene *, struct View3DShading *, eDrawType, struct Object *, int, int, enum eImBufFlags, eV3DOffscreenDrawFlag, int, const char *, struct GPUOffScreen *, struct GPUViewport *, char *) DrawViewFn
bool retiming_data_is_editable(const Strip *strip)
void timeline_init_boundbox(const Scene *scene, rctf *r_rect)
bool transform_is_locked(ListBase *channels, const Strip *strip)
Mask * active_mask_get(Scene *scene)
static void * newdataadr(FileData *fd, const void *adr)
PointerRNA RNA_id_pointer_create(ID *id)
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(* 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)
ARegionRuntimeHandle * runtime
struct SequencerCacheOverlay cache_overlay
struct SequencerTimelineOverlay timeline_overlay
SpaceSeq_Runtime * runtime
struct SequencerPreviewOverlay preview_overlay
struct wmTimer * smooth_timer
const ImBuf * reference_ibuf
float timeline_clamp_custom_range
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
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_poll(ListBase *handlers, wmKeyMap *keymap, EventHandlerPoll poll)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
bool WM_event_handler_region_v2d_mask_no_marker_poll(const wmWindow *win, const ScrArea *area, const ARegion *region, const wmEvent *event)
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)
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)