Blender
V3.3
|
#include <math.h>
#include <string.h>
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_string_utils.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf_types.h"
#include "DNA_anim_types.h"
#include "DNA_mask_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_sound_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "BKE_context.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_scene.h"
#include "BKE_sound.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "GPU_framebuffer.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_state.h"
#include "GPU_vertex_buffer.h"
#include "GPU_viewport.h"
#include "ED_anim_api.h"
#include "ED_gpencil.h"
#include "ED_markers.h"
#include "ED_mask.h"
#include "ED_screen.h"
#include "ED_sequencer.h"
#include "ED_space_api.h"
#include "ED_time_scrub_ui.h"
#include "ED_util.h"
#include "BIF_glutil.h"
#include "RNA_prototypes.h"
#include "SEQ_channels.h"
#include "SEQ_effects.h"
#include "SEQ_iterator.h"
#include "SEQ_prefetch.h"
#include "SEQ_proxy.h"
#include "SEQ_relations.h"
#include "SEQ_render.h"
#include "SEQ_select.h"
#include "SEQ_sequencer.h"
#include "SEQ_time.h"
#include "SEQ_transform.h"
#include "SEQ_utils.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "WM_api.h"
#include "WM_types.h"
#include "BLF_api.h"
#include "MEM_guardedalloc.h"
#include "sequencer_intern.h"
Go to the source code of this file.
Classes | |
struct | WaveVizData |
struct | CacheDrawData |
Macros | |
#define | SEQ_LEFTHANDLE 1 |
#define | SEQ_RIGHTHANDLE 2 |
#define | SEQ_HANDLE_SIZE 8.0f |
#define | SEQ_SCROLLER_TEXT_OFFSET 8 |
#define | MUTE_ALPHA 120 |
Typedefs | |
typedef struct WaveVizData | WaveVizData |
typedef struct CacheDrawData | CacheDrawData |
Variables | |
static Sequence * | special_seq_update = NULL |
#define MUTE_ALPHA 120 |
Definition at line 90 of file sequencer_draw.c.
#define SEQ_HANDLE_SIZE 8.0f |
Definition at line 88 of file sequencer_draw.c.
#define SEQ_LEFTHANDLE 1 |
Definition at line 86 of file sequencer_draw.c.
#define SEQ_RIGHTHANDLE 2 |
Definition at line 87 of file sequencer_draw.c.
#define SEQ_SCROLLER_TEXT_OFFSET 8 |
Definition at line 89 of file sequencer_draw.c.
typedef struct CacheDrawData CacheDrawData |
typedef struct WaveVizData WaveVizData |
Definition at line 360 of file sequencer_draw.c.
References round_fl_to_int().
Referenced by draw_seq_waveform_overlay().
|
static |
Definition at line 1181 of file sequencer_draw.c.
References View2D::cur, scene, SEQ_SCROLLER_TEXT_OFFSET, sequence_handle_size_get_clamped(), V2D_SCROLL_HANDLE_WIDTH, x2, rctf::xmax, and rctf::xmin.
Referenced by draw_seq_strip().
void color3ubv_from_seq | ( | const Scene * | curscene, |
const Sequence * | seq, | ||
const bool | show_strip_color_tag, | ||
uchar | r_col[3] | ||
) |
Definition at line 94 of file sequencer_draw.c.
References channels(), ThemeStripColor::color, Sequence::color_tag, copy_v3_v3_uchar(), rgb_byte_set_hue_float_offset(), RGN_TYPE_WINDOW, Sequence::scene, SEQ_channels_displayed_get(), SEQ_editing_get(), SEQ_render_is_muted(), SEQ_TYPE_ADD, SEQ_TYPE_ADJUSTMENT, SEQ_TYPE_ALPHAOVER, SEQ_TYPE_ALPHAUNDER, SEQ_TYPE_COLOR, SEQ_TYPE_COLORMIX, SEQ_TYPE_CROSS, SEQ_TYPE_GAMCROSS, SEQ_TYPE_GAUSSIAN_BLUR, SEQ_TYPE_GLOW, SEQ_TYPE_IMAGE, SEQ_TYPE_MASK, SEQ_TYPE_META, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MUL, SEQ_TYPE_MULTICAM, SEQ_TYPE_OVERDROP, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SPEED, SEQ_TYPE_SUB, SEQ_TYPE_TEXT, SEQ_TYPE_TRANSFORM, SEQ_TYPE_WIPE, SEQUENCE_COLOR_NONE, SEQUENCE_COLOR_TOT, SPACE_SEQ, bTheme::strip_color, TH_SEQ_AUDIO, TH_SEQ_COLOR, TH_SEQ_EFFECT, TH_SEQ_IMAGE, TH_SEQ_MASK, TH_SEQ_META, TH_SEQ_MOVIE, TH_SEQ_MOVIECLIP, TH_SEQ_SCENE, TH_SEQ_TEXT, Sequence::type, UI_GetColorPtrBlendShade3ubv(), UI_GetColorPtrShade3ubv(), UI_GetTheme(), UI_GetThemeColor3ubv(), UI_SetTheme(), UI_Theme_Restore(), and UI_Theme_Store().
Referenced by draw_seq_background(), draw_sequence_extensions_overlay(), and drawmeta_contents().
Definition at line 2554 of file sequencer_draw.c.
References C, CacheDrawData::cache_flag, Editing::cache_flag, CLAMP_MAX, CLAMP_MIN, CacheDrawData::composite_vbo, CacheDrawData::composite_vert_count, CTX_data_scene(), CTX_wm_region(), View2D::cur, draw_cache_view_batch(), draw_cache_view_init_fn(), draw_cache_view_iter_fn(), Scene::ed, RenderData::efra, CacheDrawData::final_out_vbo, CacheDrawData::final_out_vert_count, ListBase::first, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertbuf_create_with_format, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4f(), immVertexFormat(), NULL, pos, CacheDrawData::preprocessed_vbo, CacheDrawData::preprocessed_vert_count, Scene::r, CacheDrawData::raw_vbo, CacheDrawData::raw_vert_count, scene, SEQ_cache_iterate(), SEQ_CACHE_VIEW_COMPOSITE, SEQ_CACHE_VIEW_ENABLE, SEQ_CACHE_VIEW_FINAL_OUT, SEQ_CACHE_VIEW_PREPROCESSED, SEQ_CACHE_VIEW_RAW, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_TYPE_SOUND_RAM, Editing::seqbasep, RenderData::sfra, CacheDrawData::stripe_ht, CacheDrawData::stripe_ofs_y, UI_DPI_FAC, UI_view2d_region_to_view_y(), CacheDrawData::v2d, ARegion::v2d, V2D_SCROLL_HANDLE_HEIGHT, rctf::xmax, rctf::xmin, and rctf::ymin.
Referenced by draw_timeline_seq_display().
|
static |
Definition at line 2541 of file sequencer_draw.c.
References batch, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_4f, GPU_PRIM_TRIS, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertbuf_data_len_set(), GPUBatch, and NULL.
Referenced by draw_cache_view().
Definition at line 2458 of file sequencer_draw.c.
References CacheDrawData::composite_vbo, CacheDrawData::final_out_vbo, GPU_vertbuf_data_alloc(), CacheDrawData::preprocessed_vbo, and CacheDrawData::raw_vbo.
Referenced by draw_cache_view().
|
static |
Definition at line 2476 of file sequencer_draw.c.
References CacheDrawData::cache_flag, CacheDrawData::composite_vbo, CacheDrawData::composite_vert_count, copy_v2_fl2(), copy_v2_v2(), View2D::cur, CacheDrawData::final_out_vbo, CacheDrawData::final_out_vert_count, GPU_vertbuf_vert_set(), Sequence::machine, CacheDrawData::preprocessed_vbo, CacheDrawData::preprocessed_vert_count, CacheDrawData::raw_vbo, CacheDrawData::raw_vert_count, SEQ_CACHE_STORE_COMPOSITE, SEQ_CACHE_STORE_FINAL_OUT, SEQ_CACHE_STORE_PREPROCESSED, SEQ_CACHE_STORE_RAW, SEQ_CACHE_VIEW_COMPOSITE, SEQ_CACHE_VIEW_FINAL_OUT, SEQ_CACHE_VIEW_PREPROCESSED, SEQ_CACHE_VIEW_RAW, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, CacheDrawData::stripe_ht, CacheDrawData::stripe_ofs_y, UI_DPI_FAC, UI_view2d_region_to_view_y(), CacheDrawData::v2d, V2D_SCROLL_HANDLE_HEIGHT, and rctf::ymin.
Referenced by draw_cache_view().
|
static |
Definition at line 1001 of file sequencer_draw.c.
References channels(), col, SolidColorVars::col, Sequence::effectdata, Sequence::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_PRIM_LINES, immBegin(), immEnd(), immRectf(), immUniformColor4ubv(), immVertex2f(), MUTE_ALPHA, OVERLAP_ALPHA, pos, rgb_float_to_uchar(), scene, SEQ_OVERLAP, SEQ_render_is_muted(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), UI_GetColorPtrShade3ubv(), and y1.
Referenced by draw_seq_strip().
Definition at line 1449 of file sequencer_draw.c.
References ELEM, 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(), immUniformColor4ub(), immVertexFormat(), Sequence::machine, pos, scene, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by draw_seq_strips().
Definition at line 2668 of file sequencer_draw.c.
References RenderData::cfra, View2D::cur, Scene::ed, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformThemeColor(), immVertex2f(), immVertexFormat(), Editing::overlay_frame_abs, Editing::overlay_frame_flag, Editing::overlay_frame_ofs, pos, Scene::r, scene, SEQ_EDIT_OVERLAY_FRAME_ABS, TH_CFRAME, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq_display().
|
static |
Definition at line 1042 of file sequencer_draw.c.
References channels(), col, SolidColorVars::col, color3ubv_from_seq(), copy_v2_fl2(), Sequence::effectdata, ELEM, Sequence::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_PRIM_TRIS, immBegin(), immEnd(), immRectf(), immUniformColor4ubv(), immVertex2fv(), MUTE_ALPHA, OVERLAP_ALPHA, pos, rgb_float_to_uchar(), scene, Sequence::seq1, Sequence::seq2, SEQ_channels_displayed_get(), SEQ_editing_get(), SEQ_OVERLAP, SEQ_render_is_muted(), SEQ_time_has_left_still_frames(), SEQ_time_has_right_still_frames(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_time_start_frame_get(), SEQ_time_strip_length_get(), SEQ_TYPE_COLOR, SEQ_TYPE_CROSS, SEQ_TYPE_GAMCROSS, SEQ_TYPE_WIPE, Sequence::type, UI_GetColorPtrShade3ubv(), x2, and y1.
Referenced by draw_seq_strip().
|
static |
Draw f-curves as darkened regions of the strip:
Definition at line 1230 of file sequencer_draw.c.
References batch, BKE_fcurve_is_empty(), CLAMP, View2D::cur, evaluate_fcurve(), fcurve_batch_add_verts(), blender::math::floor(), GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_4f, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRI_STRIP, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_data_len_set(), GPU_vertformat_attr_add(), GPUBatch, Scene::id, id_data_find_fcurve(), max_ff(), max_ii(), min_ff(), NULL, scene, SEQ_TYPE_SOUND_RAM, Sequence::type, x2, rctf::xmax, rctf::xmin, and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 645 of file sequencer_draw.c.
References BLF_default(), BLF_set_default(), BLF_width(), BLI_snprintf_rlen(), col, Sequence::flag, G, G_TRANSFORM_SEQ, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, immRectf(), immUniformColor4ub(), immUniformColor4ubv(), Sequence::machine, pos, scene, SELECT, SEQ_effect_get_num_inputs(), SEQ_LEFTHANDLE, SEQ_LEFTSEL, SEQ_RIGHTHANDLE, SEQ_RIGHTSEL, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_TYPE_EFFECT, TH_SEQ_ACTIVE, TH_SEQ_SELECTED, Sequence::type, UI_GetColorPtrShade3ubv(), UI_GetThemeColor3ubv(), UI_view2d_text_cache_add(), x2, and y1.
Referenced by draw_seq_strip().
Definition at line 1168 of file sequencer_draw.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(), immUniformColor4f(), immVertexFormat(), pos, and x2.
Referenced by draw_seq_strip().
Definition at line 1149 of file sequencer_draw.c.
References GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_DIAG_STRIPES, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniform1i(), immUniform4f(), immVertexFormat(), pos, x2, and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 741 of file sequencer_draw.c.
References col, Sequence::flag, G, G_TRANSFORM_SEQ, imm_draw_box_wire_2d(), immRectf(), immUniformColor3ubv(), pos, scene, SELECT, SEQ_OVERLAP, SEQ_OVERLAP_OVERWRITE, SEQ_tool_settings_overlap_mode_get(), TH_BACK, TH_SEQ_ACTIVE, TH_SEQ_SELECTED, UI_GetColorPtrShade3ubv(), UI_GetThemeColor3ubv(), UI_GetThemeColorShade3ubv(), x2, and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 1305 of file sequencer_draw.c.
References BLI_rctf_size_y(), BLI_rcti_size_y(), C, calculate_seq_text_offsets(), channels(), CTX_data_scene(), View2D::cur, draw_color_strip_band(), draw_seq_background(), draw_seq_fcurve_overlay(), draw_seq_handle(), draw_seq_invalid(), draw_seq_locked(), draw_seq_outline(), draw_seq_strip_thumbnail(), draw_seq_text_overlay(), draw_seq_waveform_overlay(), draw_sequence_extensions_overlay(), drawmeta_contents(), ELEM, Sequence::flag, SequencerTimelineOverlay::flag, SpaceSeq::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immUnbindProgram(), immVertexFormat(), Sequence::machine, View2D::mask, max_ff(), min_ff(), pos, scene, SEQ_AUDIO_DRAW_WAVEFORM, SEQ_channels_displayed_get(), seq_draw_waveforms_poll(), SEQ_editing_get(), SEQ_LEFTHANDLE, SEQ_RIGHTHANDLE, SEQ_SCENE_STRIPS, SEQ_sequence_has_source(), SEQ_SHOW_OVERLAY, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_has_left_still_frames(), SEQ_time_has_right_still_frames(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_time_start_frame_get(), SEQ_time_strip_length_get(), SEQ_TIMELINE_ALL_WAVEFORMS, SEQ_TIMELINE_NO_WAVEFORMS, SEQ_TIMELINE_SHOW_FCURVES, SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG, SEQ_TIMELINE_SHOW_STRIP_DURATION, SEQ_TIMELINE_SHOW_STRIP_NAME, SEQ_TIMELINE_SHOW_STRIP_OFFSETS, SEQ_TIMELINE_SHOW_STRIP_SOURCE, SEQ_TIMELINE_SHOW_THUMBNAILS, SEQ_transform_is_locked(), SEQ_transform_single_image_check(), SEQ_TYPE_COLOR, SEQ_TYPE_IMAGE, SEQ_TYPE_META, SEQ_TYPE_MOVIE, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, sequence_handle_size_get_clamped(), special_seq_update, SpaceSeq::timeline_overlay, Sequence::type, ARegion::v2d, x2, and y1.
Referenced by draw_seq_strips().
Definition at line 2279 of file sequencer_draw.c.
References BLI_rctf_size_x(), BLI_rcti_size_x(), C, CTX_data_scene(), CTX_wm_space_seq(), View2D::cur, draw_effect_inputs_highlight(), draw_seq_strip(), ListBase::first, Sequence::flag, 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(), immUniformColor4ub(), immVertexFormat(), Sequence::machine, View2D::mask, max_ii(), min_ii(), Sequence::multicam_source, Sequence::next, pos, scene, SELECT, SEQ_effect_get_num_inputs(), SEQ_select_active_get(), SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_time_start_frame_get(), SEQ_time_strip_length_get(), SEQ_TYPE_MULTICAM, Editing::seqbasep, special_seq_update, Sequence::type, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
|
static |
Definition at line 802 of file sequencer_draw.c.
References Sequence::name, and SEQ_sequence_give_name().
Referenced by draw_seq_text_get_overlay_string().
|
static |
Definition at line 867 of file sequencer_draw.c.
References ARRAY_SIZE, BLI_assert, BLI_string_join_array(), draw_seq_text_get_name(), draw_seq_text_get_source(), FILE_MAX, SequencerTimelineOverlay::flag, scene, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_TIMELINE_SHOW_STRIP_DURATION, SEQ_TIMELINE_SHOW_STRIP_NAME, SEQ_TIMELINE_SHOW_STRIP_SOURCE, SNPRINTF, and SpaceSeq::timeline_overlay.
Referenced by draw_seq_text_overlay().
Definition at line 811 of file sequencer_draw.c.
References BLI_join_dirfile(), BLI_snprintf(), BLI_strncpy(), Sequence::clip, Strip::dir, Sequence::effectdata, bSound::filepath, Mask::id, MovieClip::id, Object::id, Scene::id, Sequence::mask, Sequence::multicam_source, StripElem::name, ID::name, NULL, Sequence::scene, Sequence::scene_camera, SEQ_TYPE_IMAGE, SEQ_TYPE_MASK, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MULTICAM, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_TEXT, Sequence::sound, Sequence::strip, Strip::stripdata, TextVars::text, and Sequence::type.
Referenced by draw_seq_text_get_overlay_string().
|
static |
Definition at line 910 of file sequencer_draw.c.
References channels(), col, draw_seq_text_get_overlay_string(), FILE_MAX, scene, SEQ_channels_displayed_get(), SEQ_editing_get(), SEQ_render_is_muted(), UI_GetColorPtrShade3ubv(), UI_view2d_text_cache_add_rectf(), x2, rctf::xmax, rctf::xmin, y1, rctf::ymax, and rctf::ymin.
Referenced by draw_seq_strip().
Definition at line 2259 of file sequencer_draw.c.
References View2D::cur, 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(), max_ii(), pos, TH_ROW_ALTERNATE, rctf::xmax, rctf::xmin, and rctf::ymin.
Referenced by draw_timeline_seq().
|
static |
x1,x2,y1,y2 | The starting and end X value to draw the wave, same for y1 and y2. |
frames_per_pixel | The amount of pixels a whole frame takes up (x-axis direction). |
Definition at line 408 of file sequencer_draw.c.
References align_frame_with_pixel(), Sequence::anim_startofs, BKE_fcurve_is_empty(), BLI_rctf_size_x(), C, CLAMP_MAX, CLAMP_MIN, CTX_data_scene(), View2D::cur, SoundWaveform::data, draw_waveform(), evaltime, evaluate_fcurve(), WaveVizData::final_sample, FPS, Scene::id, id_data_find_fcurve(), if(), SoundWaveform::length, max_ff(), MEM_callocN, MEM_freeN, min_ff(), NULL, bSound::offset_time, pos, round_fl_to_int(), sample, scene, Sequence::sound, SOUND_WAVE_SAMPLES_PER_SECOND, Sequence::startofs, ARegion::v2d, Sequence::volume, bSound::waveform, waveform_append_sample(), waveform_job_start_if_needed(), ARegion::winx, x2, rctf::xmax, rctf::xmin, and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 954 of file sequencer_draw.c.
References channels(), col, color3ubv_from_seq(), Sequence::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, imm_draw_box_wire_2d(), immRectf(), immUniformColor3ubv(), immUniformColor4ubv(), Sequence::machine, MUTE_ALPHA, pos, scene, SELECT, SEQ_channels_displayed_get(), SEQ_editing_get(), SEQ_render_is_muted(), SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_time_start_frame_get(), SEQ_time_strip_length_get(), UI_GetColorPtrShade3ubv(), x2, and y1.
Referenced by draw_seq_strip().
Definition at line 2693 of file sequencer_draw.c.
References ANIM_draw_previewrange(), C, RenderData::cfra, col, CTX_data_scene(), CTX_wm_space_seq(), SpaceSeq::draw_flag, DRAW_MARKERS_MARGIN, draw_seq_strips(), draw_seq_timeline_channels(), ED_markers_draw(), ED_region_draw_cb_draw(), ED_time_scrub_draw(), SequencerTimelineOverlay::flag, SpaceSeq::flag, SpaceSeq::gizmo_flag, ARegion::gizmo_map, GPU_clear_color(), GPU_DEPTH_NONE, GPU_depth_test(), GPU_framebuffer_bind(), GPU_framebuffer_bind_no_srgb(), GPU_viewport_framebuffer_overlay_get(), Scene::r, REGION_DRAW_POST_VIEW, REGION_DRAW_PRE_VIEW, scene, SEQ_DRAW_BACKDROP, seq_draw_sfra_efra(), SEQ_DRAWFRAMES, SEQ_editing_get(), SEQ_GIZMO_HIDE, seq_prefetch_wm_notify(), SEQ_SHOW_MARKERS, SEQ_SHOW_OVERLAY, SEQ_TIMELINE_SHOW_GRID, SEQ_VIEW_SEQUENCE, sequencer_draw_get_transform_preview(), sequencer_draw_get_transform_preview_frame(), sequencer_draw_preview(), TH_BACK, SpaceSeq::timeline_overlay, UI_GetThemeColor3fv(), UI_view2d_draw_lines_x__discrete_frames_or_seconds(), UI_view2d_text_cache_draw(), UI_view2d_view_ortho(), UI_view2d_view_orthoSpecial(), UI_view2d_view_restore(), ARegion::v2d, SpaceSeq::view, WM_draw_region_get_viewport(), WM_gizmomap_draw(), and WM_GIZMOMAP_DRAWSTEP_2D.
Referenced by sequencer_main_region_draw().
Definition at line 2769 of file sequencer_draw.c.
References C, CTX_data_scene(), CTX_wm_space_seq(), draw_cache_view(), draw_overlap_frame_indicator(), Scene::ed, ED_time_scrub_draw_current_frame(), SpaceSeq::flag, NULL, Editing::overlay_frame_flag, scene, SEQ_active_seqbase_get(), SEQ_DRAWFRAMES, SEQ_EDIT_OVERLAY_FRAME_SHOW, SEQ_editing_get(), SEQ_timeline_boundbox(), View2D::tot, UI_view2d_scrollers_draw(), UI_view2d_view_ortho(), UI_view2d_view_restore(), and ARegion::v2d.
Referenced by sequencer_main_region_draw_overlay().
|
static |
Definition at line 349 of file sequencer_draw.c.
References draw_waveform_segment().
Referenced by draw_seq_waveform_overlay().
|
static |
Definition at line 299 of file sequencer_draw.c.
References WaveVizData::clip, col, WaveVizData::draw_line, get_vertex_count(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINE_STRIP, GPU_PRIM_TRI_STRIP, GPU_SHADER_2D_FLAT_COLOR, GPU_vertformat_attr_add(), immAttr4f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), WaveVizData::pos, pos, and WaveVizData::rms_pos.
Referenced by draw_waveform().
|
static |
Definition at line 534 of file sequencer_draw.c.
References BLI_listbase_is_empty(), channels(), col, SolidColorVars::col, color3ubv_from_seq(), Sequence::effectdata, ListBase::first, 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(), immUniformColor4ubv(), immVertexFormat(), Sequence::machine, max_ii(), MAXSEQ, min_ii(), Sequence::next, offset, pos, rgb_float_to_uchar(), scene, SEQ_channels_displayed_get(), SEQ_editing_get(), SEQ_get_seqbase_from_sequence(), SEQ_render_is_muted(), SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_TYPE_COLOR, SEQ_TYPE_SCENE, Sequence::start, Sequence::type, x2, and y1.
Referenced by draw_seq_strip().
Definition at line 1504 of file sequencer_draw.c.
References NULL, and sequencer_special_update_set().
Referenced by change_frame_seq_preview_end().
Definition at line 1489 of file sequencer_draw.c.
References special_seq_update.
Referenced by change_frame_seq_preview_end().
Definition at line 1494 of file sequencer_draw.c.
References C, CTX_data_scene(), CTX_wm_region(), find_nearest_seq(), scene, sequencer_special_update_set(), and ARegion::v2d.
Referenced by change_frame_seq_preview_begin().
|
static |
Definition at line 1207 of file sequencer_draw.c.
References copy_v2_fl2(), GPU_vertbuf_vert_set(), and y1.
Referenced by draw_seq_fcurve_overlay().
|
static |
Definition at line 286 of file sequencer_draw.c.
References WaveVizData::draw_line, WaveVizData::final_sample, and blender::math::length().
Referenced by draw_waveform_segment().
|
static |
Definition at line 2080 of file sequencer_draw.c.
References C, col, CTX_data_scene(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_space_seq(), ED_screen_animation_no_scrub(), ELEM, Sequence::flag, SequencerPreviewOverlay::flag, SpaceSeq::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_PRIM_LINE_LOOP, GPU_PRIM_POINTS, GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform4f(), immUniformColor3f(), immUniformColor3fv(), immVertex2f(), immVertexFormat(), SpaceSeq::mainb, pos, SpaceSeq::preview_overlay, ARegion::regiontype, RGN_TYPE_PREVIEW, SELECT, SEQ_DRAW_IMG_HISTOGRAM, SEQ_DRAW_IMG_VECTORSCOPE, SEQ_DRAW_IMG_WAVEFORM, SEQ_image_transform_final_quad_get(), SEQ_image_transform_origin_offset_pixelspace_get(), SEQ_PREVIEW_SHOW_OUTLINE_SELECTED, SEQ_SHOW_OVERLAY, sequencer_view_preview_only_poll(), TH_SEQ_ACTIVE, TH_SEQ_SELECTED, and UI_GetThemeColor3fv().
Referenced by sequencer_draw_preview().
Definition at line 2372 of file sequencer_draw.c.
References BLI_listbase_is_empty(), View2D::cur, MetaStack::disp_range, RenderData::efra, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_CHECKER, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1i(), immUniform4f(), immUniformThemeColorShade(), immUniformThemeColorShadeAlpha(), immVertex2f(), immVertexFormat(), ListBase::last, Editing::metastack, pos, Scene::r, scene, SEQ_editing_get(), RenderData::sfra, TH_BACK, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
|
static |
Definition at line 248 of file sequencer_draw.c.
References Sequence::flag, SequencerTimelineOverlay::flag, SpaceSeq::flag, NULL, SEQ_AUDIO_DRAW_WAVEFORM, SEQ_SHOW_OVERLAY, SEQ_TIMELINE_ALL_WAVEFORMS, SEQ_TIMELINE_NO_WAVEFORMS, SEQ_TYPE_SOUND_RAM, Sequence::sound, SpaceSeq::timeline_overlay, and Sequence::type.
Referenced by draw_seq_strip().
Definition at line 1744 of file sequencer_draw.c.
References C, CTX_data_main(), NC_SCENE, ND_SEQUENCER, NULL, scene, SEQ_prefetch_need_redraw(), and WM_event_add_notifier().
Referenced by draw_timeline_seq(), and sequencer_draw_preview().
Definition at line 633 of file sequencer_draw.c.
References min_ff(), scene, SEQ_HANDLE_SIZE, SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by calculate_seq_text_offsets(), draw_seq_strip(), find_nearest_seq(), and sequencer_box_select_exec().
|
static |
Definition at line 1581 of file sequencer_draw.c.
References SequencerScopes::histogram_ibuf, IMB_freeImBuf(), NULL, SequencerScopes::reference_ibuf, SequencerScopes::sep_waveform_ibuf, SequencerScopes::vector_ibuf, SequencerScopes::waveform_ibuf, and SequencerScopes::zebra_ibuf.
Referenced by sequencer_get_scope().
Definition at line 1626 of file sequencer_draw.c.
References float(), Scene::r, scene, RenderData::xasp, RenderData::xsch, RenderData::yasp, and RenderData::ysch.
Referenced by sequencer_draw_preview(), and sequencer_preview_get_rect().
|
static |
Draw content and safety borders.
Definition at line 1649 of file sequencer_draw.c.
References DisplaySafeAreas::action, DisplaySafeAreas::action_center, SequencerPreviewOverlay::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformThemeColor(), immUniformThemeColorBlend(), immVertexFormat(), SpaceSeq::preview_overlay, Scene::safe_areas, scene, SEQ_PREVIEW_SHOW_SAFE_CENTER, SEQ_PREVIEW_SHOW_SAFE_MARGINS, TH_BACK, TH_VIEW_OVERLAY, DisplaySafeAreas::title, DisplaySafeAreas::title_center, View2D::tot, UI_DPI_FAC, UI_draw_safe_areas(), x2, rctf::xmax, rctf::xmin, y1, rctf::ymax, and rctf::ymin.
Referenced by sequencer_draw_preview().
|
static |
Definition at line 1878 of file sequencer_draw.c.
References BLI_rctf_init(), C, data, draw_backdrop(), Scene::ed, SpaceSeq::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_DATA_UBYTE, GPU_FETCH_FLOAT, GPU_matrix_identity_projection_set(), GPU_matrix_identity_set(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), GPU_PRIM_TRI_FAN, GPU_RGBA8, GPU_SHADER_2D_IMAGE_COLOR, GPU_texture_bind(), GPU_texture_create_2d(), GPU_texture_filter_mode(), GPU_texture_free(), GPU_texture_unbind(), GPU_texture_update(), GPU_vertformat_attr_add(), IMB_colormanagement_finish_glsl_draw(), IMB_display_buffer_release(), IMB_rect_from_float(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor3f(), immVertex2f(), immVertexFormat(), SpaceSeq::mainb, NULL, Editing::overlay_frame_rect, SpaceSeq::overlay_frame_type, pos, usdtokens::preview(), ImBuf::rect, ImBuf::rect_float, scene, SEQ_DRAW_IMG_IMBUF, SEQ_OVERLAY_FRAME_TYPE_RECT, SEQ_USE_ALPHA, sequencer_OCIO_transform_ibuf(), sequencer_preview_get_rect(), ImBuf::x, rctf::xmax, rctf::xmin, ImBuf::y, rctf::ymax, and rctf::ymin.
Referenced by sequencer_draw_preview().
Definition at line 2051 of file sequencer_draw.c.
References SpaceSeq::draw_flag, Sequence::flag, G, G_TRANSFORM_SEQ, NULL, scene, SELECT, SEQ_DRAW_TRANSFORM_PREVIEW, SEQ_LEFTSEL, SEQ_RIGHTSEL, and SEQ_select_active_get().
Referenced by draw_timeline_seq(), and sequencer_draw_preview().
|
static |
Definition at line 2063 of file sequencer_draw.c.
References BLI_assert, Sequence::flag, NULL, scene, SEQ_RIGHTSEL, SEQ_select_active_get(), SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by draw_timeline_seq(), and sequencer_draw_preview().
Definition at line 1634 of file sequencer_draw.c.
References C, ED_annotation_draw_2dimage(), ED_annotation_draw_view2d(), and UI_view2d_view_restore().
Referenced by sequencer_draw_preview().
void sequencer_draw_preview | ( | const bContext * | C, |
Scene * | scene, | ||
ARegion * | region, | ||
SpaceSeq * | sseq, | ||
int | timeline_frame, | ||
int | offset, | ||
bool | draw_overlay, | ||
bool | draw_backdrop | ||
) |
Definition at line 2147 of file sequencer_draw.c.
References C, channels(), CTX_data_expect_evaluated_depsgraph(), CTX_data_main(), depsgraph, draw_backdrop(), Scene::ed, ED_region_draw_cb_draw(), ED_region_image_metadata_draw(), ED_space_sequencer_check_show_imbuf(), SequencerPreviewOverlay::flag, SpaceSeq::flag, G, SpaceSeq::gpd, GPU_DEPTH_NONE, GPU_depth_test(), GPU_framebuffer_bind(), GPU_framebuffer_bind_no_srgb(), GPU_viewport_framebuffer_overlay_get(), IMB_freeImBuf(), imm_draw_box_checker_2d(), SpaceSeq::multiview_eye, names, NULL, offset, SpaceSeq::overlay_frame_type, SpaceSeq::preview_overlay, REGION_DRAW_POST_VIEW, SpaceSeq::render_size, scene, SEQ_channels_displayed_get(), SEQ_collection_free(), seq_draw_image_origin_and_outline(), SEQ_editing_get(), SEQ_ITERATOR_FOREACH, SEQ_OVERLAY_FRAME_TYPE_REFERENCE, seq_prefetch_wm_notify(), SEQ_PREVIEW_SHOW_GPENCIL, SEQ_PREVIEW_SHOW_METADATA, SEQ_query_rendered_strips(), SEQ_RENDER_SIZE_NONE, SEQ_select_active_get(), SEQ_SHOW_OVERLAY, SEQ_USE_ALPHA, Editing::seqbasep, sequencer_display_size(), sequencer_draw_borders_overlay(), sequencer_draw_display_buffer(), sequencer_draw_get_transform_preview(), sequencer_draw_get_transform_preview_frame(), sequencer_draw_gpencil_overlay(), sequencer_get_scope(), sequencer_ibuf_get(), sequencer_preview_clear(), sequencer_stop_running_jobs(), STEREO_LEFT_NAME, STEREO_RIGHT_NAME, View2D::tot, UI_view2d_curRect_validate(), UI_view2d_totRect_set(), UI_view2d_view_ortho(), UI_view2d_view_restore(), ARegion::v2d, WM_draw_region_get_viewport(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq(), and sequencer_preview_region_draw().
|
static |
Definition at line 1990 of file sequencer_draw.c.
References Scene::display_settings, draw_backdrop(), SpaceSeq::flag, SequencerScopes::histogram_ibuf, IMB_colormanagement_imbuf_make_display_space(), IMB_dupImBuf(), IMB_freeImBuf(), SpaceSeq::mainb, make_histogram_view_from_ibuf(), make_sep_waveform_view_from_ibuf(), make_vectorscope_view_from_ibuf(), make_waveform_view_from_ibuf(), make_zebra_view_from_ibuf(), NULL, ImBuf::rect_float, SequencerScopes::reference_ibuf, scene, SpaceSeq::scopes, SequencerScopes::sep_waveform_ibuf, SEQ_DRAW_COLOR_SEPARATED, SEQ_DRAW_IMG_HISTOGRAM, SEQ_DRAW_IMG_IMBUF, SEQ_DRAW_IMG_VECTORSCOPE, SEQ_DRAW_IMG_WAVEFORM, sequencer_check_scopes(), sequencer_make_scope(), SequencerScopes::vector_ibuf, Scene::view_settings, SequencerScopes::waveform_ibuf, SpaceSeq::zebra, and SequencerScopes::zebra_ibuf.
Referenced by sequencer_draw_preview().
ImBuf* sequencer_ibuf_get | ( | struct Main * | bmain, |
struct ARegion * | region, | ||
struct Depsgraph * | depsgraph, | ||
struct Scene * | scene, | ||
struct SpaceSeq * | sseq, | ||
int | timeline_frame, | ||
int | frame_ofs, | ||
const char * | viewname | ||
) |
Rendering using opengl will change the current viewport/context. This is why we need the region, to set back the render area.
TODO: do not rely on such hack and just update the ibuf outside of the UI drawing code.
Definition at line 1509 of file sequencer_draw.c.
References BKE_scene_multiview_view_id_get(), SpaceSeq::chanshown, blender::compositor::context, depsgraph, fb(), SpaceSeq::flag, G, GPU_framebuffer_active_get(), GPU_framebuffer_bind(), GPU_framebuffer_restore(), GPU_viewport_bind(), GPU_viewport_unbind(), SpaceSeq::multiview_eye, NULL, Scene::r, SpaceSeq::render_size, scene, SEQ_render_give_ibuf(), SEQ_render_give_ibuf_direct(), SEQ_render_new_render_data(), SEQ_RENDER_SIZE_NONE, SEQ_RENDER_SIZE_SCENE, SEQ_rendersize_to_scale_factor(), SEQ_USE_PROXIES, RenderData::size, special_seq_update, STEREO_RIGHT_ID, view, ARegion::winrct, WM_draw_region_get_bound_viewport(), RenderData::xsch, and RenderData::ysch.
Referenced by metadata_panel_context_draw(), sequencer_draw_preview(), and sequencer_sample_apply().
|
static |
Definition at line 1611 of file sequencer_draw.c.
References Scene::display_settings, IMB_colormanagement_imbuf_make_display_space(), IMB_dupImBuf(), IMB_freeImBuf(), scene, and Scene::view_settings.
Referenced by sequencer_get_scope().
|
static |
Definition at line 1751 of file sequencer_draw.c.
References BLI_assert_msg, C, ImBuf::channels, ImBuf::dither, ED_draw_imbuf_method(), ImBuf::float_colorspace, GPU_DATA_FLOAT, GPU_DATA_UBYTE, GPU_RGB16F, GPU_RGBA16F, GPU_RGBA8, IMAGE_DRAW_METHOD_GLSL, IMB_colormanagement_setup_glsl_draw_ctx(), IMB_colormanagement_setup_glsl_draw_from_space_ctx(), IMB_display_buffer_acquire_ctx(), NULL, ImBuf::rect, ImBuf::rect_colorspace, and ImBuf::rect_float.
Referenced by sequencer_draw_display_buffer().
Definition at line 1832 of file sequencer_draw.c.
References TH_SEQ_PREVIEW, and UI_ThemeClearColor().
Referenced by sequencer_draw_preview().
|
static |
Definition at line 1837 of file sequencer_draw.c.
References BLI_rctf_init(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), draw_backdrop(), Scene::ed, fabsf, float(), Editing::overlay_frame_rect, SpaceSeq::overlay_frame_type, usdtokens::preview(), scene, SEQ_OVERLAY_FRAME_TYPE_RECT, sequencer_display_size(), View2D::tot, ARegion::v2d, ARegion::winrct, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by sequencer_draw_display_buffer().
Definition at line 1484 of file sequencer_draw.c.
References special_seq_update.
Referenced by ED_sequencer_special_preview_clear(), and ED_sequencer_special_preview_set().
Definition at line 1819 of file sequencer_draw.c.
References C, CTX_wm_manager(), G, NULL, OB_RENDER, Scene::r, scene, RenderData::seq_prev_type, WM_JOB_TYPE_COMPOSITE, WM_JOB_TYPE_RENDER_PREVIEW, and WM_jobs_kill_type().
Referenced by sequencer_draw_preview().
|
static |
Definition at line 378 of file sequencer_draw.c.
References max_ff(), min_ff(), pos, and write_waveform_data().
Referenced by draw_seq_waveform_overlay().
Definition at line 266 of file sequencer_draw.c.
References BLI_spin_lock(), BLI_spin_unlock(), C, sequencer_preview_add_sound(), Sequence::sound, SOUND_TAGS_WAVEFORM_LOADING, bSound::spinlock, bSound::tags, and bSound::waveform.
Referenced by draw_seq_waveform_overlay().
|
static |
Definition at line 365 of file sequencer_draw.c.
References WaveVizData::clip, WaveVizData::draw_line, WaveVizData::pos, pos, and WaveVizData::rms_pos.
Referenced by waveform_append_sample().
Definition at line 92 of file sequencer_draw.c.
Referenced by draw_seq_strip(), draw_seq_strips(), ED_sequencer_special_preview_get(), sequencer_ibuf_get(), and sequencer_special_update_set().