|
Blender
V2.93
|
#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 "SEQ_effects.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 |
Functions | |
| void | color3ubv_from_seq (Scene *curscene, Sequence *seq, uchar col[3]) |
| static int | get_section_len (WaveVizData *start, WaveVizData *end) |
| static void | draw_waveform (WaveVizData *iter, WaveVizData *end, GPUPrimType prim_type, bool use_rms) |
| static float | clamp_frame_coord_to_pixel (float frame_coord, float pixel_frac, float frames_per_pixel) |
| static void | draw_seq_waveform_overlay (View2D *v2d, const bContext *C, SpaceSeq *sseq, Scene *scene, Sequence *seq, float x1, float y1, float x2, float y2, float frames_per_pixel) |
| static void | drawmeta_contents (Scene *scene, Sequence *seqm, float x1, float y1, float x2, float y2) |
| float | sequence_handle_size_get_clamped (Sequence *seq, const float pixelx) |
| static void | draw_seq_handle (View2D *v2d, Sequence *seq, const float handsize_clamped, const short direction, uint pos, bool seq_active, float pixelx, bool y_threshold) |
| static void | draw_seq_outline (Sequence *seq, uint pos, float x1, float x2, float y1, float y2, float pixelx, float pixely, bool seq_active) |
| static const char * | draw_seq_text_get_name (Sequence *seq) |
| static void | draw_seq_text_get_source (Sequence *seq, char *r_source, size_t source_len) |
| static size_t | draw_seq_text_get_overlay_string (SpaceSeq *sseq, Sequence *seq, char *r_overlay_string, size_t overlay_string_len) |
| static void | draw_seq_text_overlay (View2D *v2d, Sequence *seq, SpaceSeq *sseq, float x1, float x2, float y1, float y2, bool seq_active) |
| static void | draw_sequence_extensions_overlay (Scene *scene, Sequence *seq, uint pos, float pixely) |
| static void | draw_color_strip_band (Sequence *seq, uint pos, float text_margin_y, float y1) |
| static void | draw_seq_background (Scene *scene, Sequence *seq, uint pos, float x1, float x2, float y1, float y2, bool is_single_image) |
| static void | draw_seq_locked (float x1, float y1, float x2, float y2) |
| static void | draw_seq_invalid (float x1, float x2, float y2, float text_margin_y) |
| static void | calculate_seq_text_offsets (View2D *v2d, Sequence *seq, float *x1, float *x2, float pixelx) |
| static void | fcurve_batch_add_verts (GPUVertBuf *vbo, float y1, float y2, float y_height, int timeline_frame, float curve_val, unsigned int *vert_count) |
| static void | draw_seq_fcurve_overlay (Scene *scene, View2D *v2d, Sequence *seq, float x1, float y1, float x2, float y2, float pixelx) |
| static void | draw_seq_strip (const bContext *C, SpaceSeq *sseq, Scene *scene, ARegion *region, Sequence *seq, float pixelx, bool seq_active) |
| static void | draw_effect_inputs_highlight (Sequence *seq) |
| void | sequencer_special_update_set (Sequence *seq) |
| Sequence * | ED_sequencer_special_preview_get (void) |
| void | ED_sequencer_special_preview_set (bContext *C, const int mval[2]) |
| void | ED_sequencer_special_preview_clear (void) |
| ImBuf * | sequencer_ibuf_get (struct Main *bmain, ARegion *region, struct Depsgraph *depsgraph, Scene *scene, SpaceSeq *sseq, int timeline_frame, int frame_ofs, const char *viewname) |
| static void | sequencer_check_scopes (SequencerScopes *scopes, ImBuf *ibuf) |
| static ImBuf * | sequencer_make_scope (Scene *scene, ImBuf *ibuf, ImBuf *(*make_scope_fn)(ImBuf *ibuf)) |
| static void | sequencer_display_size (Scene *scene, float r_viewrect[2]) |
| static void | sequencer_draw_gpencil_overlay (const bContext *C) |
| static void | sequencer_draw_borders_overlay (const SpaceSeq *sseq, const View2D *v2d, const Scene *scene) |
| static void | seq_prefetch_wm_notify (const bContext *C, Scene *scene) |
| static void * | sequencer_OCIO_transform_ibuf (const bContext *C, ImBuf *ibuf, bool *r_glsl_used, eGPUTextureFormat *r_format, eGPUDataFormat *r_data, void **r_buffer_cache_handle) |
| static void | sequencer_stop_running_jobs (const bContext *C, Scene *scene) |
| static void | sequencer_preview_clear (void) |
| static void | sequencer_preview_get_rect (rctf *preview, Scene *scene, ARegion *region, SpaceSeq *sseq, bool draw_overlay, bool draw_backdrop) |
| static void | sequencer_draw_display_buffer (const bContext *C, Scene *scene, ARegion *region, SpaceSeq *sseq, ImBuf *ibuf, ImBuf *scope, bool draw_overlay, bool draw_backdrop) |
| static ImBuf * | sequencer_get_scope (Scene *scene, SpaceSeq *sseq, ImBuf *ibuf, bool draw_backdrop) |
| static bool | sequencer_draw_get_transform_preview (SpaceSeq *sseq, Scene *scene) |
| static int | sequencer_draw_get_transform_preview_frame (Scene *scene) |
| void | sequencer_draw_preview (const bContext *C, Scene *scene, ARegion *region, SpaceSeq *sseq, int timeline_frame, int offset, bool draw_overlay, bool draw_backdrop) |
| static void | draw_seq_backdrop (View2D *v2d) |
| static void | draw_seq_strips (const bContext *C, Editing *ed, ARegion *region) |
| static void | seq_draw_sfra_efra (Scene *scene, View2D *v2d) |
| static bool | draw_cache_view_init_fn (void *userdata, size_t item_count) |
| static bool | draw_cache_view_iter_fn (void *userdata, struct Sequence *seq, int timeline_frame, int cache_type) |
| static void | draw_cache_view_batch (GPUVertBuf *vbo, size_t vert_count, float col_r, float col_g, float col_b, float col_a) |
| static void | draw_cache_view (const bContext *C) |
| void | draw_timeline_seq (const bContext *C, ARegion *region) |
| void | draw_timeline_seq_display (const bContext *C, ARegion *region) |
Variables | |
| static Sequence * | special_seq_update = NULL |
| #define MUTE_ALPHA 120 |
Definition at line 102 of file sequencer_draw.c.
| #define SEQ_HANDLE_SIZE 8.0f |
Definition at line 100 of file sequencer_draw.c.
| #define SEQ_LEFTHANDLE 1 |
Definition at line 98 of file sequencer_draw.c.
| #define SEQ_RIGHTHANDLE 2 |
Definition at line 99 of file sequencer_draw.c.
| #define SEQ_SCROLLER_TEXT_OFFSET 8 |
Definition at line 101 of file sequencer_draw.c.
| typedef struct CacheDrawData CacheDrawData |
| typedef struct WaveVizData WaveVizData |
|
static |
Definition at line 1154 of file sequencer_draw.c.
References View2D::cur, SEQ_SCROLLER_TEXT_OFFSET, sequence_handle_size_get_clamped(), V2D_SCROLL_HANDLE_WIDTH, x2, rctf::xmax, and rctf::xmin.
Referenced by draw_seq_strip().
|
static |
Definition at line 307 of file sequencer_draw.c.
Referenced by draw_seq_waveform_overlay().
Definition at line 111 of file sequencer_draw.c.
References col, Sequence::flag, rgb_byte_set_hue_float_offset(), Sequence::scene, SEQ_MUTE, 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, 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(), and UI_GetThemeColor3ubv().
Referenced by draw_seq_background(), draw_sequence_extensions_overlay(), and drawmeta_contents().
|
static |
Definition at line 2457 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_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().
|
static |
Definition at line 2444 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().
|
static |
Definition at line 2361 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 2379 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 992 of file sequencer_draw.c.
References col, SolidColorVars::col, Sequence::effectdata, Sequence::enddisp, Sequence::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_PRIM_LINES, immBegin(), immEnd(), immRectf(), immUniformColor4ubv(), immVertex2f(), MUTE_ALPHA, pos, rgb_float_to_uchar(), SEQ_MUTE, Sequence::startdisp, UI_GetColorPtrShade3ubv(), and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 1410 of file sequencer_draw.c.
References ELEM, Sequence::enddisp, 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, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, and Sequence::startdisp.
Referenced by draw_seq_strips().
|
static |
Definition at line 2140 of file sequencer_draw.c.
References View2D::cur, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformThemeColor(), immUniformThemeColorShade(), immVertex2f(), immVertexFormat(), max_ii(), pos, TH_BACK, TH_GRID, TH_ROW_ALTERNATE, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
|
static |
Definition at line 1024 of file sequencer_draw.c.
References col, SolidColorVars::col, color3ubv_from_seq(), copy_v2_fl2(), Sequence::effectdata, ELEM, Sequence::enddisp, Sequence::endstill, Sequence::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_PRIM_TRIS, immBegin(), immEnd(), immRectf(), immUniformColor4ubv(), immVertex2fv(), Sequence::len, max_ff(), min_ff(), MUTE_ALPHA, pos, rgb_float_to_uchar(), scene, Sequence::seq1, Sequence::seq2, SEQ_MUTE, SEQ_transform_get_left_handle_frame(), SEQ_transform_get_right_handle_frame(), SEQ_TYPE_COLOR, SEQ_TYPE_CROSS, SEQ_TYPE_GAMCROSS, SEQ_TYPE_WIPE, Sequence::start, Sequence::startdisp, Sequence::startstill, 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 1203 of file sequencer_draw.c.
References batch, BKE_fcurve_is_empty(), CLAMP, View2D::cur, evaluate_fcurve(), fcurve_batch_add_verts(), 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, RNA_Sequence, scene, SEQ_TYPE_SOUND_RAM, Sequence::type, x2, rctf::xmax, rctf::xmin, and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 658 of file sequencer_draw.c.
References BLF_default(), BLF_set_default(), BLF_width(), BLI_snprintf_rlen(), col, Sequence::enddisp, Sequence::flag, G, G_TRANSFORM_SEQ, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, immRectf(), immUniformColor4ub(), immUniformColor4ubv(), Sequence::machine, pos, SELECT, SEQ_effect_get_num_inputs(), SEQ_LEFTHANDLE, SEQ_LEFTSEL, SEQ_RIGHTHANDLE, SEQ_RIGHTSEL, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_TYPE_EFFECT, Sequence::startdisp, 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 1141 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 1122 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 747 of file sequencer_draw.c.
References col, Sequence::flag, G, G_TRANSFORM_SEQ, imm_draw_box_wire_2d(), immRectf(), immUniformColor3ubv(), pos, SELECT, SEQ_OVERLAP, 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 1278 of file sequencer_draw.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_y(), C, calculate_seq_text_offsets(), View2D::cur, draw_color_strip_band(), SpaceSeq::draw_flag, draw_seq_background(), draw_seq_fcurve_overlay(), draw_seq_handle(), draw_seq_invalid(), draw_seq_locked(), draw_seq_outline(), draw_seq_text_overlay(), draw_seq_waveform_overlay(), draw_sequence_extensions_overlay(), drawmeta_contents(), Sequence::enddisp, Sequence::endofs, Sequence::endstill, Sequence::flag, SpaceSeq::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immUnbindProgram(), immVertexFormat(), Sequence::len, Sequence::machine, View2D::mask, max_ff(), min_ff(), pos, scene, SEQ_ALL_WAVEFORMS, SEQ_AUDIO_DRAW_WAVEFORM, SEQ_DRAW_OFFSET_EXT, SEQ_LEFTHANDLE, SEQ_LOCK, SEQ_NO_WAVEFORMS, SEQ_RIGHTHANDLE, SEQ_SCENE_STRIPS, SEQ_sequence_has_source(), SEQ_SHOW_FCURVES, SEQ_SHOW_STRIP_DURATION, SEQ_SHOW_STRIP_NAME, SEQ_SHOW_STRIP_OVERLAY, SEQ_SHOW_STRIP_SOURCE, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_transform_single_image_check(), SEQ_TYPE_COLOR, SEQ_TYPE_META, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, sequence_handle_size_get_clamped(), special_seq_update, Sequence::start, Sequence::startdisp, Sequence::startofs, Sequence::startstill, Sequence::type, ARegion::v2d, ARegion::winx, x2, and y1.
Referenced by draw_seq_strips().
Definition at line 2185 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(), Sequence::enddisp, 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::len, 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_TYPE_MULTICAM, Editing::seqbasep, special_seq_update, Sequence::start, Sequence::startdisp, Sequence::type, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_seq().
|
static |
Definition at line 805 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 870 of file sequencer_draw.c.
References ARRAY_SIZE, BLI_assert, BLI_string_join_array(), draw_seq_text_get_name(), draw_seq_text_get_source(), Sequence::enddisp, FILE_MAX, SpaceSeq::flag, SEQ_SHOW_STRIP_DURATION, SEQ_SHOW_STRIP_NAME, SEQ_SHOW_STRIP_SOURCE, SNPRINTF, and Sequence::startdisp.
Referenced by draw_seq_text_overlay().
|
static |
Definition at line 814 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 911 of file sequencer_draw.c.
References col, draw_seq_text_get_overlay_string(), FILE_MAX, Sequence::flag, SEQ_MUTE, UI_GetColorPtrShade3ubv(), UI_view2d_text_cache_add_rectf(), x2, rctf::xmax, rctf::xmin, y1, rctf::ymax, and rctf::ymin.
Referenced by draw_seq_strip().
|
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 323 of file sequencer_draw.c.
References Sequence::anim_startofs, BKE_fcurve_is_empty(), BLI_spin_lock(), BLI_spin_unlock(), C, clamp_frame_coord_to_pixel(), CLAMP_MAX, CLAMP_MIN, WaveVizData::clip, View2D::cur, SoundWaveform::data, draw_waveform(), WaveVizData::end, evaltime, evaluate_fcurve(), fabsf, Sequence::flag, SpaceSeq::flag, floor(), FPS, GPU_PRIM_LINE_STRIP, GPU_PRIM_TRI_STRIP, Scene::id, id_data_find_fcurve(), if(), SoundWaveform::length, max_ff(), MEM_callocN, MEM_freeN, min_ff(), NULL, bSound::offset_time, WaveVizData::pos, WaveVizData::rms_pos, RNA_Sequence, scene, SEQ_ALL_WAVEFORMS, SEQ_AUDIO_DRAW_WAVEFORM, sequencer_preview_add_sound(), Sequence::sound, SOUND_TAGS_WAVEFORM_LOADING, SOUND_WAVE_SAMPLES_PER_SECOND, bSound::spinlock, Sequence::startofs, bSound::tags, Sequence::volume, bSound::waveform, x2, rctf::xmax, rctf::xmin, and y1.
Referenced by draw_seq_strip().
|
static |
Definition at line 952 of file sequencer_draw.c.
References col, color3ubv_from_seq(), Sequence::enddisp, Sequence::endofs, Sequence::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, imm_draw_box_wire_2d(), immRectf(), immUniformColor3ubv(), immUniformColor4ubv(), Sequence::len, Sequence::machine, MUTE_ALPHA, pos, scene, SELECT, SEQ_MUTE, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, Sequence::start, Sequence::startdisp, Sequence::startofs, UI_GetColorPtrShade3ubv(), x2, and y1.
Referenced by draw_seq_strip().
Definition at line 2558 of file sequencer_draw.c.
References ANIM_draw_previewrange(), BLI_rcti_init(), C, RenderData::cfra, col, CTX_data_scene(), CTX_wm_space_seq(), View2D::cur, draw_cache_view(), SpaceSeq::draw_flag, DRAW_MARKERS_MARGIN, draw_seq_backdrop(), draw_seq_strips(), DRAWCFRA_UNIT_SECONDS, Scene::ed, ED_markers_draw(), ED_region_draw_cb_draw(), ED_time_scrub_draw(), ListBase::first, SpaceSeq::flag, FPS, GPU_clear_color(), GPU_COMP_F32, GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_framebuffer_bind(), GPU_framebuffer_bind_no_srgb(), GPU_PRIM_LINES, GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_framebuffer_overlay_get(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformThemeColor(), immVertex2f(), immVertexFormat(), Editing::metastack, Editing::over_cfra, Editing::over_flag, Editing::over_ofs, pos, Scene::r, REGION_DRAW_POST_VIEW, REGION_DRAW_PRE_VIEW, scene, SEQ_active_seqbase_get(), SEQ_DRAW_BACKDROP, seq_draw_sfra_efra(), SEQ_DRAWFRAMES, SEQ_EDIT_OVERLAY_ABS, SEQ_EDIT_OVERLAY_SHOW, SEQ_editing_get(), seq_prefetch_wm_notify(), SEQ_SHOW_MARKERS, SEQ_timeline_boundbox(), SEQ_VIEW_SEQUENCE, sequencer_draw_get_transform_preview(), sequencer_draw_get_transform_preview_frame(), sequencer_draw_preview(), TH_BACK, TH_CFRAME, TH_SCROLL_TEXT, View2D::tot, UI_DPI_FAC, UI_GetThemeColor3fv(), UI_TIME_SCRUB_MARGIN_Y, UI_view2d_constant_grid_draw(), UI_view2d_draw_scale_y__block(), UI_view2d_text_cache_draw(), UI_view2d_view_ortho(), UI_view2d_view_orthoSpecial(), UI_view2d_view_restore(), ARegion::v2d, SpaceSeq::view, ARegion::winy, WM_draw_region_get_viewport(), rctf::ymax, and rctf::ymin.
Referenced by sequencer_main_region_draw().
Definition at line 2673 of file sequencer_draw.c.
References C, CTX_data_scene(), CTX_wm_space_seq(), ED_time_scrub_draw_current_frame(), SpaceSeq::flag, NULL, scene, SEQ_DRAWFRAMES, UI_view2d_scrollers_draw(), and ARegion::v2d.
Referenced by sequencer_main_region_draw_overlay().
|
static |
Definition at line 255 of file sequencer_draw.c.
References WaveVizData::clip, col, WaveVizData::end, get_section_len(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, 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_seq_waveform_overlay().
|
static |
Definition at line 558 of file sequencer_draw.c.
References BLI_listbase_is_empty(), col, SolidColorVars::col, color3ubv_from_seq(), Sequence::effectdata, Sequence::enddisp, 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(), immUniformColor4ubv(), immVertexFormat(), Sequence::machine, max_ii(), MAXSEQ, min_ii(), Sequence::next, pos, rgb_float_to_uchar(), scene, SEQ_get_seqbase_from_sequence(), SEQ_MUTE, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_TYPE_COLOR, SEQ_TYPE_SCENE, Sequence::start, Sequence::startdisp, Sequence::type, x2, and y1.
Referenced by draw_seq_strip().
| void ED_sequencer_special_preview_clear | ( | void | ) |
Definition at line 1465 of file sequencer_draw.c.
References NULL, and sequencer_special_update_set().
Referenced by change_frame_seq_preview_end().
| Sequence* ED_sequencer_special_preview_get | ( | void | ) |
Definition at line 1450 of file sequencer_draw.c.
References special_seq_update.
Referenced by change_frame_seq_preview_end().
| void ED_sequencer_special_preview_set | ( | bContext * | C, |
| const int | mval[2] | ||
| ) |
Definition at line 1455 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 1180 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 242 of file sequencer_draw.c.
References WaveVizData::end, and len.
Referenced by draw_waveform().
Definition at line 2275 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().
Definition at line 1710 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 649 of file sequencer_draw.c.
References Sequence::enddisp, min_ff(), SEQ_HANDLE_SIZE, and Sequence::startdisp.
Referenced by calculate_seq_text_offsets(), draw_seq_strip(), find_nearest_seq(), and sequencer_box_select_exec().
|
static |
Definition at line 1548 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 1593 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 |
Definition at line 1614 of file sequencer_draw.c.
References DisplaySafeAreas::action, DisplaySafeAreas::action_center, SpaceSeq::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(), Scene::safe_areas, scene, SEQ_SHOW_SAFE_CENTER, SEQ_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 1844 of file sequencer_draw.c.
References BLI_rctf_init(), C, data, 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(), immUniform1i(), immUniformColor3f(), immVertex2f(), immVertexFormat(), SpaceSeq::mainb, NULL, Editing::over_border, SpaceSeq::overlay_type, pos, ImBuf::rect, ImBuf::rect_float, scene, SEQ_DRAW_IMG_IMBUF, SEQ_DRAW_OVERLAY_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 2018 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 2030 of file sequencer_draw.c.
References BLI_assert, Sequence::enddisp, Sequence::flag, NULL, scene, SEQ_RIGHTSEL, SEQ_select_active_get(), and Sequence::startdisp.
Referenced by draw_timeline_seq(), and sequencer_draw_preview().
|
static |
Definition at line 1601 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 2047 of file sequencer_draw.c.
References C, CTX_data_expect_evaluated_depsgraph(), CTX_data_main(), depsgraph, ED_region_image_metadata_draw(), ED_space_sequencer_check_show_imbuf(), SpaceSeq::flag, G, SpaceSeq::gpd, GPU_DEPTH_NONE, GPU_depth_test(), GPU_framebuffer_bind_no_srgb(), GPU_viewport_framebuffer_overlay_get(), IMB_freeImBuf(), imm_draw_box_checker_2d(), SpaceSeq::multiview_eye, names, NULL, SpaceSeq::overlay_type, SpaceSeq::render_size, scene, SEQ_DRAW_OVERLAY_REFERENCE, seq_prefetch_wm_notify(), SEQ_RENDER_SIZE_NONE, SEQ_SHOW_GPENCIL, SEQ_SHOW_METADATA, SEQ_SHOW_STRIP_OVERLAY, SEQ_USE_ALPHA, 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 1957 of file sequencer_draw.c.
References Scene::display_settings, 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, |
| ARegion * | region, | ||
| struct Depsgraph * | depsgraph, | ||
| Scene * | scene, | ||
| 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 1477 of file sequencer_draw.c.
References BKE_scene_multiview_view_id_get(), SpaceSeq::chanshown, 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 1578 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 1717 of file sequencer_draw.c.
References BLI_assert, 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().
|
static |
Definition at line 1798 of file sequencer_draw.c.
References TH_SEQ_PREVIEW, and UI_ThemeClearColor().
Referenced by sequencer_draw_preview().
|
static |
Definition at line 1803 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(), Scene::ed, fabsf, float(), Editing::over_border, SpaceSeq::overlay_type, scene, SEQ_DRAW_OVERLAY_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().
| void sequencer_special_update_set | ( | Sequence * | seq | ) |
Definition at line 1445 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 1785 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().
Definition at line 109 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().