|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "DNA_sequence_types.h"#include "BKE_context.hh"#include "BKE_fcurve.hh"#include "BLF_api.hh"#include "GPU_batch.hh"#include "GPU_matrix.hh"#include "GPU_state.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_keyframes_draw.hh"#include "ED_keyframes_keylist.hh"#include "ED_screen.hh"#include "UI_view2d.hh"#include "SEQ_connect.hh"#include "SEQ_retiming.hh"#include "SEQ_sequencer.hh"#include "SEQ_time.hh"#include "sequencer_intern.hh"#include "sequencer_quads_batch.hh"Go to the source code of this file.
Macros | |
| #define | KEY_SIZE (10 * U.pixelsize) |
| #define | KEY_CENTER (UI_view2d_view_to_region_y(v2d, strip_y_rescale(seq, 0.0f)) + 4 + KEY_SIZE / 2) |
| #define | RETIME_KEY_MOUSEOVER_THRESHOLD (16.0f * UI_SCALE_FAC) |
Functions | |
| bool | retiming_keys_can_be_displayed (const SpaceSeq *sseq) |
| static float | strip_y_rescale (const Sequence *seq, const float y_value) |
| static float | key_x_get (const Scene *scene, const Sequence *seq, const SeqRetimingKey *key) |
| static float | pixels_to_view_width (const bContext *C, const float width) |
| static float | pixels_to_view_height (const bContext *C, const float height) |
| static float | strip_start_screenspace_get (const Scene *scene, const View2D *v2d, const Sequence *seq) |
| static float | strip_end_screenspace_get (const Scene *scene, const View2D *v2d, const Sequence *seq) |
| static rctf | strip_box_get (const Scene *scene, const View2D *v2d, const Sequence *seq) |
| rctf | seq_retiming_keys_box_get (const Scene *scene, const View2D *v2d, const Sequence *seq) |
| int | left_fake_key_frame_get (const bContext *C, const Sequence *seq) |
| int | right_fake_key_frame_get (const bContext *C, const Sequence *seq) |
| static bool | retiming_fake_key_frame_clicked (const bContext *C, const Sequence *seq, const int mval[2], int &r_frame) |
| void | realize_fake_keys (const Scene *scene, Sequence *seq) |
| SeqRetimingKey * | try_to_realize_fake_keys (const bContext *C, Sequence *seq, const int mval[2]) |
| static SeqRetimingKey * | mouse_over_key_get_from_strip (const bContext *C, const Sequence *seq, const int mval[2]) |
| SeqRetimingKey * | retiming_mouseover_key_get (const bContext *C, const int mval[2], Sequence **r_seq) |
| static bool | can_draw_retiming (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx) |
Retiming Key | |
| static void | retime_key_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const SeqRetimingKey *key, const KeyframeShaderBindings &sh_bindings) |
| void | sequencer_retiming_draw_continuity (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx) |
| static SeqRetimingKey | fake_retiming_key_init (const Scene *scene, const Sequence *seq, int key_x) |
| static bool | fake_keys_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const KeyframeShaderBindings &sh_bindings) |
| void | sequencer_retiming_keys_draw (const TimelineDrawContext *timeline_ctx, blender::Span< StripDrawContext > strips) |
Retiming Speed Label | |
| static size_t | label_str_get (const Sequence *seq, const SeqRetimingKey *key, char *r_label_str, const size_t label_str_maxncpy) |
| static bool | label_rect_get (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const SeqRetimingKey *key, const char *label_str, const size_t label_len, rctf *rect) |
| static void | retime_speed_text_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const SeqRetimingKey *key) |
| void | sequencer_retiming_speed_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx) |
| #define KEY_CENTER (UI_view2d_view_to_region_y(v2d, strip_y_rescale(seq, 0.0f)) + 4 + KEY_SIZE / 2) |
Definition at line 43 of file sequencer_retiming_draw.cc.
Referenced by retime_key_draw(), seq_retiming_keys_box_get(), and sequencer_retiming_draw_continuity().
| #define KEY_SIZE (10 * U.pixelsize) |
Definition at line 42 of file sequencer_retiming_draw.cc.
Referenced by label_rect_get(), retime_key_draw(), seq_retiming_keys_box_get(), and sequencer_retiming_draw_continuity().
| #define RETIME_KEY_MOUSEOVER_THRESHOLD (16.0f * UI_SCALE_FAC) |
Size in pixels.
Definition at line 102 of file sequencer_retiming_draw.cc.
Referenced by mouse_over_key_get_from_strip(), and retiming_fake_key_frame_clicked().
|
static |
Definition at line 233 of file sequencer_retiming_draw.cc.
References StripDrawContext::can_draw_retiming_overlay, TimelineDrawContext::ed, retiming_keys_can_be_displayed(), StripDrawContext::seq, SEQ_retiming_is_allowed(), and TimelineDrawContext::sseq.
Referenced by sequencer_retiming_draw_continuity(), sequencer_retiming_keys_draw(), and sequencer_retiming_speed_draw().
|
static |
Definition at line 372 of file sequencer_retiming_draw.cc.
References TimelineDrawContext::C, fake_retiming_key_init(), left_fake_key_frame_get(), retime_key_draw(), right_fake_key_frame_get(), StripDrawContext::right_handle, TimelineDrawContext::scene, StripDrawContext::seq, SEQ_retiming_data_is_editable(), SEQ_retiming_is_active(), SEQ_retiming_key_get_by_timeline_frame(), and SEQ_time_content_end_frame_get().
Referenced by sequencer_retiming_keys_draw().
|
static |
Definition at line 360 of file sequencer_retiming_draw.cc.
References SeqRetimingKey::flag, SEQ_time_get_rounded_sound_offset(), SEQ_time_media_playback_rate_factor_get(), SEQ_time_start_frame_get(), and SeqRetimingKey::strip_frame_index.
Referenced by fake_keys_draw().
|
static |
Definition at line 57 of file sequencer_retiming_draw.cc.
References SEQ_retiming_is_last_key(), and SEQ_retiming_key_timeline_frame_get().
Referenced by label_rect_get(), mouse_over_key_get_from_strip(), retime_key_draw(), retime_speed_text_draw(), and sequencer_retiming_draw_continuity().
|
static |
Definition at line 491 of file sequencer_retiming_draw.cc.
References BLF_default(), BLF_height(), BLF_width(), TimelineDrawContext::C, KEY_SIZE, key_x_get(), StripDrawContext::left_handle, max_ff(), min_ff(), pixels_to_view_height(), pixels_to_view_width(), StripDrawContext::right_handle, TimelineDrawContext::scene, StripDrawContext::seq, strip_y_rescale(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by retime_speed_text_draw().
|
static |
Definition at line 471 of file sequencer_retiming_draw.cc.
References BLI_snprintf_rlen(), round_fl_to_int(), SEQ_retiming_key_is_transition_start(), and SEQ_retiming_key_speed_get().
Referenced by retime_speed_text_draw().
Definition at line 112 of file sequencer_retiming_draw.cc.
References CTX_data_scene(), max_ii(), SEQ_time_get_rounded_sound_offset(), SEQ_time_left_handle_frame_get(), and SEQ_time_start_frame_get().
Referenced by ensure_left_and_right_keys(), fake_keys_draw(), retiming_fake_key_frame_clicked(), and sequencer_select_exec().
|
static |
Definition at line 177 of file sequencer_retiming_draw.cc.
References CTX_data_scene(), distance(), fabsf, key_x_get(), RETIME_KEY_MOUSEOVER_THRESHOLD, round_fl_to_int(), SEQ_retiming_keys_get(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), UI_view2d_fromcontext(), and UI_view2d_view_to_region_x().
Referenced by retiming_mouseover_key_get().
Definition at line 72 of file sequencer_retiming_draw.cc.
References UI_view2d_fromcontext(), and UI_view2d_view_to_region_y().
Referenced by label_rect_get().
Definition at line 65 of file sequencer_retiming_draw.cc.
References UI_view2d_fromcontext(), and UI_view2d_view_to_region_x().
Referenced by label_rect_get().
Definition at line 157 of file sequencer_retiming_draw.cc.
References SEQ_retiming_add_key(), SEQ_retiming_data_ensure(), SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by sequencer_select_exec(), and try_to_realize_fake_keys().
|
static |
Definition at line 259 of file sequencer_retiming_draw.cc.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_KEYFRAME, BEZT_KEYTYPE_MOVEHOLD, BLI_rctf_isect_x(), CLAMP, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), draw_keyframe_shape(), KEY_CENTER, KEY_SIZE, key_x_get(), KEYFRAME_SHAPE_BOTH, StripDrawContext::left_handle, TimelineDrawContext::retiming_selection, StripDrawContext::right_handle, TimelineDrawContext::scene, StripDrawContext::seq, SEQ_retiming_data_is_editable(), SEQ_retiming_key_is_freeze_frame(), SEQ_retiming_key_is_transition_type(), strip_box_get(), UI_view2d_view_to_region_x(), and TimelineDrawContext::v2d.
Referenced by fake_keys_draw(), and sequencer_retiming_keys_draw().
|
static |
Definition at line 514 of file sequencer_retiming_draw.cc.
References col, Sequence::flag, key_x_get(), label_rect_get(), label_str_get(), StripDrawContext::left_handle, StripDrawContext::right_handle, TimelineDrawContext::scene, SELECT, StripDrawContext::seq, SEQ_retiming_is_last_key(), UI_view2d_text_cache_add(), TimelineDrawContext::v2d, rctf::xmin, and rctf::ymin.
Referenced by sequencer_retiming_speed_draw().
|
static |
Definition at line 128 of file sequencer_retiming_draw.cc.
References BLI_rctf_isect_pt(), CTX_data_scene(), fabs(), left_fake_key_frame_get(), min_ff(), RETIME_KEY_MOUSEOVER_THRESHOLD, right_fake_key_frame_get(), seq_retiming_keys_box_get(), SEQ_time_content_end_frame_get(), SEQ_time_right_handle_frame_get(), UI_view2d_fromcontext(), and UI_view2d_view_to_region_x().
Referenced by try_to_realize_fake_keys().
| bool retiming_keys_can_be_displayed | ( | const SpaceSeq * | sseq | ) |
Definition at line 45 of file sequencer_retiming_draw.cc.
References SequencerTimelineOverlay::flag, SpaceSeq::flag, SEQ_SHOW_OVERLAY, SEQ_TIMELINE_SHOW_STRIP_RETIMING, and SpaceSeq::timeline_overlay.
Referenced by can_draw_retiming(), is_mouse_over_retiming_key(), sequencer_box_select_exec(), sequencer_de_select_all_exec(), sequencer_retiming_keys_draw(), sequencer_select_exec(), and strip_draw_context_set_retiming_overlay_visibility().
| SeqRetimingKey * retiming_mouseover_key_get | ( | const bContext * | C, |
| const int | mval[2], | ||
| Sequence ** | r_seq ) |
Definition at line 207 of file sequencer_retiming_draw.cc.
References BLI_rctf_isect_pt(), CTX_data_scene(), mouse_over_key_get_from_strip(), seq_retiming_keys_box_get(), sequencer_visible_strips_get(), and UI_view2d_fromcontext().
Referenced by sequencer_select_exec(), and sequencer_select_handle_exec().
Definition at line 120 of file sequencer_retiming_draw.cc.
References CTX_data_scene(), min_ii(), SEQ_time_content_end_frame_get(), SEQ_time_get_rounded_sound_offset(), and SEQ_time_right_handle_frame_get().
Referenced by ensure_left_and_right_keys(), fake_keys_draw(), retiming_fake_key_frame_clicked(), and sequencer_select_exec().
Definition at line 104 of file sequencer_retiming_draw.cc.
References KEY_CENTER, KEY_SIZE, strip_box_get(), rctf::ymax, and rctf::ymin.
Referenced by is_mouse_over_retiming_key(), retiming_fake_key_frame_clicked(), and retiming_mouseover_key_get().
| void sequencer_retiming_draw_continuity | ( | const TimelineDrawContext * | timeline_ctx, |
| const StripDrawContext & | strip_ctx ) |
Definition at line 306 of file sequencer_retiming_draw.cc.
References SeqQuadsBatch::add_quad(), can_draw_retiming(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), KEY_CENTER, KEY_SIZE, key_x_get(), StripDrawContext::left_handle, max_ff(), min_ff(), TimelineDrawContext::quads, TimelineDrawContext::retiming_selection, StripDrawContext::right_handle, TimelineDrawContext::scene, StripDrawContext::seq, SEQ_retiming_data_is_editable(), SEQ_retiming_keys_count(), SEQ_retiming_keys_get(), UI_view2d_view_to_region_x(), and TimelineDrawContext::v2d.
Referenced by draw_retiming_continuity_ranges().
| void sequencer_retiming_keys_draw | ( | const TimelineDrawContext * | timeline_ctx, |
| blender::Span< StripDrawContext > | strips ) |
Definition at line 402 of file sequencer_retiming_draw.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), can_draw_retiming(), KeyframeShaderBindings::color_id, TimelineDrawContext::ed, fake_keys_draw(), KeyframeShaderBindings::flags_id, GPU_COMP_F32, GPU_COMP_U32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_matrix_pop_projection(), GPU_matrix_push_projection(), GPU_PRIM_POINTS, GPU_program_point_size(), GPU_SHADER_KEYFRAME_SHAPE, GPU_vertformat_attr_add(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform2f(), immVertexFormat(), blender::Span< T >::is_empty(), View2D::mask, KeyframeShaderBindings::outline_color_id, KeyframeShaderBindings::pos_id, TimelineDrawContext::region, retime_key_draw(), retiming_keys_can_be_displayed(), SEQ_retiming_keys_get(), KeyframeShaderBindings::size_id, TimelineDrawContext::sseq, TimelineDrawContext::v2d, and wmOrtho2_region_pixelspace().
Referenced by draw_seq_strips().
| void sequencer_retiming_speed_draw | ( | const TimelineDrawContext * | timeline_ctx, |
| const StripDrawContext & | strip_ctx ) |
Definition at line 550 of file sequencer_retiming_draw.cc.
References can_draw_retiming(), retime_speed_text_draw(), StripDrawContext::seq, SEQ_retiming_keys_get(), UI_view2d_view_ortho(), and TimelineDrawContext::v2d.
Referenced by draw_seq_strips().
Definition at line 91 of file sequencer_retiming_draw.cc.
References strip_end_screenspace_get(), strip_start_screenspace_get(), strip_y_rescale(), UI_view2d_view_to_region_y(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by retime_key_draw(), and seq_retiming_keys_box_get().
|
static |
Definition at line 86 of file sequencer_retiming_draw.cc.
References SEQ_time_right_handle_frame_get(), and UI_view2d_view_to_region_x().
Referenced by strip_box_get().
|
static |
Definition at line 79 of file sequencer_retiming_draw.cc.
References SEQ_time_left_handle_frame_get(), and UI_view2d_view_to_region_x().
Referenced by strip_box_get().
Definition at line 51 of file sequencer_retiming_draw.cc.
References Sequence::machine, SEQ_STRIP_OFSBOTTOM, and SEQ_STRIP_OFSTOP.
Referenced by label_rect_get(), and strip_box_get().
| SeqRetimingKey * try_to_realize_fake_keys | ( | const bContext * | C, |
| Sequence * | seq, | ||
| const int | mval[2] ) |
Definition at line 164 of file sequencer_retiming_draw.cc.
References CTX_data_scene(), realize_fake_keys(), retiming_fake_key_frame_clicked(), and SEQ_retiming_key_get_by_timeline_frame().
Referenced by sequencer_select_exec().