Blender
V3.3
|
#include "BKE_context.h"
#include "BKE_scene.h"
#include "GPU_immediate.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "ED_time_scrub_ui.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_timecode.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
Go to the source code of this file.
Functions | |
void | ED_time_scrub_region_rect_get (const ARegion *region, rcti *rect) |
static int | get_centered_text_y (const rcti *rect) |
static void | draw_background (const rcti *rect) |
static void | get_current_time_str (const Scene *scene, bool display_seconds, int frame, uint max_len, char *r_str) |
static void | draw_current_frame (const Scene *scene, bool display_seconds, const View2D *v2d, const rcti *scrub_region_rect, int current_frame) |
void | ED_time_scrub_draw_current_frame (const ARegion *region, const Scene *scene, bool display_seconds) |
void | ED_time_scrub_draw (const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames) |
bool | ED_time_scrub_event_in_region (const ARegion *region, const wmEvent *event) |
void | ED_time_scrub_channel_search_draw (const bContext *C, ARegion *region, bDopeSheet *dopesheet) |
Definition at line 48 of file time_scrub_ui.c.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), pos, TH_TIME_SCRUB_BACKGROUND, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by DRW_draw_render_loop_offscreen(), ED_time_scrub_draw(), ED_view3d_draw_offscreen(), and ED_view3d_draw_offscreen_simple().
|
static |
Definition at line 75 of file time_scrub_ui.c.
References BKE_scene_ctime_get(), get_centered_text_y(), get_current_time_str(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColor(), immUniformThemeColorShadeAlpha(), immVertexFormat(), MAX2, max_ii(), NULL, pos, round_fl_to_int(), scene, TH_BACK, TH_CFRAME, TH_HEADER_TEXT_HI, UI_CNR_ALL, UI_DPI_FAC, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_fontstyle_draw_simple(), UI_fontstyle_string_width(), UI_FSTYLE_WIDGET, UI_GetThemeColor4ubv(), UI_GetThemeColorShade4fv(), UI_view2d_view_to_region_x(), rcti::ymax, and rcti::ymin.
Referenced by ED_time_scrub_draw_current_frame().
void ED_time_scrub_channel_search_draw | ( | const bContext * | C, |
ARegion * | region, | ||
bDopeSheet * | dopesheet | ||
) |
Definition at line 199 of file time_scrub_ui.c.
References BLI_rcti_size_x(), C, CTX_wm_screen(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_matrix_pop_projection(), GPU_matrix_push_projection(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), NULL, pos, ptr, RNA_pointer_create(), TH_BACK, UI_block_align_begin(), UI_block_align_end(), UI_block_begin(), UI_block_bounds_set_normal(), UI_BLOCK_CLIP_EVENTS, UI_block_draw(), UI_block_end(), UI_block_flag_enable(), UI_block_layout(), UI_block_layout_resolve(), UI_block_layout_set_current(), UI_DPI_FAC, UI_EMBOSS, UI_LAYOUT_HEADER, UI_LAYOUT_VERTICAL, UI_style_get_dpi(), UI_TIME_SCRUB_MARGIN_Y, UI_UNIT_Y, uiItemR(), uiLayoutSetScaleY(), ARegion::winx, ARegion::winy, wmOrtho2_region_pixelspace(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by action_channel_region_draw(), graph_channel_region_draw(), and nla_channel_region_draw().
void ED_time_scrub_draw | ( | const ARegion * | region, |
const Scene * | scene, | ||
bool | display_seconds, | ||
bool | discrete_frames | ||
) |
Definition at line 163 of file time_scrub_ui.c.
References draw_background(), ED_time_scrub_region_rect_get(), get_centered_text_y(), GPU_matrix_pop_projection(), GPU_matrix_push_projection(), scene, TH_TEXT, UI_DPI_FAC, UI_view2d_draw_scale_x__discrete_frames_or_seconds(), UI_view2d_draw_scale_x__frames_or_seconds(), ARegion::v2d, wmOrtho2_region_pixelspace(), and rcti::ymin.
Referenced by action_main_region_draw(), dopesheet_region_draw(), draw_timeline_seq(), graph_main_region_draw(), graph_region_draw(), and nla_main_region_draw().
void ED_time_scrub_draw_current_frame | ( | const ARegion * | region, |
const Scene * | scene, | ||
bool | display_seconds | ||
) |
Definition at line 148 of file time_scrub_ui.c.
References RenderData::cfra, draw_current_frame(), ED_time_scrub_region_rect_get(), GPU_matrix_pop_projection(), GPU_matrix_push_projection(), Scene::r, scene, ARegion::v2d, and wmOrtho2_region_pixelspace().
Referenced by action_main_region_draw_overlay(), dopesheet_region_draw(), draw_timeline_seq_display(), graph_main_region_draw_overlay(), graph_region_draw(), and nla_main_region_draw_overlay().
Definition at line 192 of file time_scrub_ui.c.
References BLI_rcti_isect_pt_v(), UI_TIME_SCRUB_MARGIN_Y, ARegion::winrct, wmEvent::xy, rcti::ymax, and rcti::ymin.
Referenced by change_frame_seq_preview_begin(), clip_preview_region_init(), and ed_default_handlers().
Definition at line 35 of file time_scrub_ui.c.
References UI_TIME_SCRUB_MARGIN_Y, ARegion::winx, ARegion::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_time_scrub_draw(), ED_time_scrub_draw_current_frame(), sequencer_main_clamp_view(), and sequencer_view_all_exec().
|
static |
Definition at line 43 of file time_scrub_ui.c.
References BLI_rcti_cent_y(), and UI_DPI_FAC.
Referenced by draw_current_frame(), and ED_time_scrub_draw().
|
static |
Definition at line 64 of file time_scrub_ui.c.
References BLI_snprintf(), BLI_timecode_string_from_time(), FPS, and FRA2TIME.
Referenced by draw_current_frame().