80 const Scene *
scene,
bool display_seconds,
int frame,
uint max_len,
char *r_str)
82 if (display_seconds) {
93 const rcti *scrub_region_rect,
118 subframe_x -
U.pixelsize,
119 scrub_region_rect->
ymax - box_padding,
120 subframe_x +
U.pixelsize,
127 float outline_color[4];
132 .xmin = frame_x - box_width / 2 +
U.pixelsize / 2,
133 .xmax = frame_x + box_width / 2 +
U.pixelsize / 2,
134 .ymin = scrub_region_rect->
ymin + box_padding,
135 .ymax = scrub_region_rect->
ymax - box_padding,
147 frame_x - text_width / 2 +
U.pixelsize / 2,
155 bool display_seconds,
162 rcti scrub_region_rect;
171 bool display_seconds,
172 bool discrete_frames)
179 rcti scrub_region_rect;
184 rcti numbers_rect = scrub_region_rect;
186 if (discrete_frames) {
188 region, v2d, &numbers_rect,
scene, display_seconds,
TH_TEXT);
192 region, v2d, &numbers_rect,
scene, display_seconds,
TH_TEXT);
233 rect.
xmin + padding_x,
242 uiItemR(layout, &
ptr,
"filter_text", 0,
"", ICON_NONE);
243 uiItemR(layout, &
ptr,
"use_filter_invert", 0,
"", ICON_ARROW_LEFTRIGHT);
struct bScreen * CTX_wm_screen(const bContext *C)
float BKE_scene_frame_get(const struct Scene *scene)
bool BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y)
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, const size_t maxncpy, const int brevity_level, const float time_seconds, const double scene_fps, const 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)
int UI_fontstyle_string_width(const struct uiFontStyle *fs, const char *str)
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)
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_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds, bool draw_line)
void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDopeSheet *dopesheet)
static void draw_current_frame(const Scene *scene, bool display_seconds, const View2D *v2d, const rcti *scrub_region_rect, int current_frame, bool draw_line)
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 get_time_scrub_region_rect(const ARegion *region, rcti *rect)
bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event)
void wmOrtho2_region_pixelspace(const ARegion *region)