33 #include "RNA_prototypes.h"
65 const Scene *
scene,
bool display_seconds,
int frame,
uint max_len,
char *r_str)
67 if (display_seconds) {
78 const rcti *scrub_region_rect,
105 subframe_x - (line_outline +
U.pixelsize),
106 scrub_region_rect->
ymax - box_padding,
107 subframe_x + (line_outline +
U.pixelsize),
113 subframe_x -
U.pixelsize,
114 scrub_region_rect->
ymax - box_padding,
115 subframe_x +
U.pixelsize,
122 float outline_color[4];
127 .xmin = frame_x - box_width / 2 +
U.pixelsize / 2,
128 .xmax = frame_x + box_width / 2 +
U.pixelsize / 2,
129 .ymin = scrub_region_rect->
ymin + box_padding,
130 .ymax = scrub_region_rect->
ymax - box_padding,
142 frame_x - text_width / 2 +
U.pixelsize / 2,
150 bool display_seconds)
156 rcti scrub_region_rect;
165 bool display_seconds,
166 bool discrete_frames)
173 rcti scrub_region_rect;
178 rcti numbers_rect = scrub_region_rect;
180 if (discrete_frames) {
182 region, v2d, &numbers_rect,
scene, display_seconds,
TH_TEXT);
186 region, v2d, &numbers_rect,
scene, display_seconds,
TH_TEXT);
227 rect.
xmin + padding_x,
236 uiItemR(layout, &
ptr,
"filter_text", 0,
"", ICON_NONE);
237 uiItemR(layout, &
ptr,
"use_filter_invert", 0,
"", ICON_ARROW_LEFTRIGHT);
struct bScreen * CTX_wm_screen(const bContext *C)
float BKE_scene_ctime_get(const struct Scene *scene)
MINLINE int round_fl_to_int(float a)
MINLINE int max_ii(int a, int b)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t BLI_timecode_string_from_time(char *str, size_t maxncpy, int brevity_level, float time_seconds, double fps, short timecode_style) ATTR_NONNULL()
void GPU_matrix_pop_projection(void)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_2D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
const struct uiStyle * UI_style_get_dpi(void)
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void UI_block_bounds_set_normal(struct uiBlock *block, int addval)
void UI_fontstyle_draw_simple(const struct uiFontStyle *fs, float x, float y, const char *str, const uchar col[4])
void UI_draw_roundbox_corner_set(int type)
void UI_block_end(const struct bContext *C, uiBlock *block)
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const struct uiStyle *style)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void UI_block_align_begin(uiBlock *block)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
void UI_draw_roundbox_4fv_ex(const struct rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void UI_block_layout_set_current(uiBlock *block, uiLayout *layout)
void UI_block_flag_enable(uiBlock *block, int flag)
int UI_fontstyle_string_width(const struct uiFontStyle *fs, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void UI_block_align_end(uiBlock *block)
@ TH_TIME_SCRUB_BACKGROUND
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4])
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
float UI_view2d_view_to_region_x(const struct View2D *v2d, float x)
#define UI_TIME_SCRUB_MARGIN_Y
void UI_view2d_draw_scale_x__discrete_frames_or_seconds(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, const struct Scene *scene, bool display_seconds, int colorid)
void UI_view2d_draw_scale_x__frames_or_seconds(const struct ARegion *region, const struct View2D *v2d, const struct rcti *rect, const struct Scene *scene, bool display_seconds, int colorid)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
static void get_current_time_str(const Scene *scene, bool display_seconds, int frame, uint max_len, char *r_str)
static void draw_background(const rcti *rect)
void ED_time_scrub_region_rect_get(const ARegion *region, rcti *rect)
void ED_time_scrub_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds)
void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDopeSheet *dopesheet)
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames)
static int get_centered_text_y(const rcti *rect)
static void draw_current_frame(const Scene *scene, bool display_seconds, const View2D *v2d, const rcti *scrub_region_rect, int current_frame)
bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event)
void wmOrtho2_region_pixelspace(const ARegion *region)