51 ot->name =
"Sample Color";
52 ot->idname =
"SEQUENCER_OT_sample";
53 ot->description =
"Use mouse to sample color in current frame";
66 prop =
RNA_def_int(
ot->srna,
"size", 1, 1, 128,
"Sample Size",
"", 1, 64);
97 float pad_top, pad_bottom;
131 ot->name =
"Frame All";
132 ot->idname =
"SEQUENCER_OT_view_all";
133 ot->description =
"View all the strips in the sequencer";
160 ot->name =
"Go to Current Frame";
161 ot->idname =
"SEQUENCER_OT_view_frame";
162 ot->description =
"Move the view to the current frame";
191 if (hist.
data.is_empty()) {
212 const float val_max = 3.0f;
249 int width, height, imgwidth, imgheight;
251 width = region->
winx;
252 height = region->
winy;
254 seq_reset_imageofs(sseq);
259 imgwidth = int(imgwidth * (scene->
r.
xasp / scene->
r.
yasp));
261 if (((imgwidth >= width) || (imgheight >= height)) && ((width > 0) && (height > 0))) {
265 sseq->zoom = (zoomX < zoomY) ? zoomX : zoomY;
283 ot->name =
"Frame All";
284 ot->idname =
"SEQUENCER_OT_view_all_preview";
285 ot->description =
"Zoom preview to fit in the area";
327 ot->name =
"Sequencer View Zoom Ratio";
328 ot->idname =
"SEQUENCER_OT_view_zoom_ratio";
329 ot->description =
"Change zoom ratio of sequencer preview";
342 "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out",
358 scene, strips,
true);
368 if (minsize < 1.0f) {
385 int xmargin = scene->frames_per_second();
387 for (
Strip *strip : strips) {
391 ymin =
min_ii(ymin, strip->channel);
393 ymax =
max_ii(ymax, strip->channel + 1);
402 new_viewport.
xmin = xmin;
403 new_viewport.
xmax = xmax;
405 new_viewport.
ymin = ymin;
406 new_viewport.
ymax = ymax;
417 float timeline_ymin = box.
ymin;
418 float timeline_ymax = box.
ymax;
420 if (orig_height > timeline_ymax - timeline_ymin) {
430 new_viewport.
ymin = ymid - (orig_height / 2.0f);
431 new_viewport.
ymax = ymid + (orig_height / 2.0f);
433 if (new_viewport.
ymin < timeline_ymin) {
434 new_viewport.
ymin = timeline_ymin;
435 new_viewport.
ymax = new_viewport.
ymin + orig_height;
437 else if (new_viewport.
ymax > timeline_ymax) {
438 new_viewport.
ymax = timeline_ymax;
439 new_viewport.
ymin = new_viewport.
ymax - orig_height;
442 *rect = new_viewport;
481 ot->name =
"Frame Selected";
482 ot->idname =
"SEQUENCER_OT_view_selected";
483 ot->description =
"Zoom the sequencer on the selected strips";
536 ot->name =
"Border Offset View";
537 ot->idname =
"SEQUENCER_OT_view_ghost_border";
538 ot->description =
"Set the boundaries of the border used for offset view";
bScreen * CTX_wm_screen(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
Scene * CTX_data_sequencer_scene(const bContext *C)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
MINLINE int min_ii(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE float power_of_2(float f)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
void BLI_rctf_pad_y(struct rctf *rect, float boundary_size, float pad_min, float pad_max)
void BLI_rctf_scale(rctf *rect, float scale)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void BLI_rctf_pad(struct rctf *rect, float pad_x, float pad_y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
void BLI_rctf_resize(struct rctf *rect, float x, float y)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
@ SEQ_CACHE_SHOW_FINAL_OUT
void ED_area_tag_redraw(ScrArea *area)
bool ED_operator_sequencer_active(bContext *C)
void ED_region_tag_redraw(ARegion *region)
void ED_imbuf_sample_cancel(bContext *C, wmOperator *op)
wmOperatorStatus ED_imbuf_sample_modal(bContext *C, wmOperator *op, const wmEvent *event)
bool ED_imbuf_sample_poll(bContext *C)
wmOperatorStatus ED_imbuf_sample_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void UI_view2d_smooth_view(const bContext *C, ARegion *region, const rctf *cur, int smooth_viewtx)
void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag)
#define UI_MARKER_MARGIN_Y
#define V2D_SCROLL_HANDLE_HEIGHT
#define UI_TIME_CACHE_MARGIN_Y
void UI_view2d_curRect_changed(const bContext *C, View2D *v2d)
#define UI_TIME_SCRUB_MARGIN_Y
View2D * UI_view2d_fromcontext(const bContext *C)
void UI_view2d_region_to_view_rctf(const View2D *v2d, const rctf *rect_src, rctf *rect_dst) ATTR_NONNULL()
void ANIM_center_frame(bContext *C, int smooth_viewtx)
ListBase * ED_sequencer_context_get_markers(const bContext *C)
void SEQUENCER_OT_view_all_preview(wmOperatorType *ot)
static wmOperatorStatus view_ghost_border_exec(bContext *C, wmOperator *op)
static wmOperatorStatus sequencer_view_frame_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_selected(wmOperatorType *ot)
void SEQUENCER_OT_view_frame(wmOperatorType *ot)
void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot)
static wmOperatorStatus sequencer_view_all_exec(bContext *C, wmOperator *op)
blender::VectorSet< Strip * > selected_strips_from_context(bContext *C)
void SEQUENCER_OT_sample(wmOperatorType *ot)
void SEQ_get_timeline_region_padding(const bContext *C, float *r_pad_top, float *r_pad_bottom)
bool sequencer_editing_initialized_and_active(bContext *C)
static wmOperatorStatus sequencer_view_zoom_ratio_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_view_all(wmOperatorType *ot)
static wmOperatorStatus sequencer_view_all_preview_exec(bContext *C, wmOperator *op)
static void seq_view_collection_rect_timeline(const bContext *C, blender::Span< Strip * > strips, rctf *rect)
bool sequencer_view_preview_only_poll(const bContext *C)
void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot)
static bool view_frame_preview_scope(bContext *C, wmOperator *op, ARegion *region)
bool sequencer_view_has_preview_poll(bContext *C)
void SEQ_add_timeline_region_padding(const bContext *C, rctf *view_box)
static void seq_view_collection_rect_preview(Scene *scene, blender::Span< Strip * > strips, rctf *rect)
static wmOperatorStatus sequencer_view_selected_exec(bContext *C, wmOperator *op)
T reduce_max(const VecBase< T, Size > &a)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
Bounds< float2 > image_transform_bounding_box_from_collection(Scene *scene, blender::Span< Strip * > strips, bool apply_rotation)
void timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *r_rect)
Editing * editing_get(const Scene *scene)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
MetaStack * meta_stack_active_get(const Editing *ed)
constexpr int MAX_CHANNELS
void timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
void timeline_init_boundbox(const Scene *scene, rctf *r_rect)
ListBase * active_seqbase_get(const Editing *ed)
float RNA_float_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
struct SequencerCacheOverlay cache_overlay
SpaceSeq_Runtime * runtime
static float bin_to_float(int bin)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
wmOperatorStatus WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_border_to_rctf(wmOperator *op, rctf *r_rect)
int WM_operator_smooth_viewtx_get(const wmOperator *op)