|
Blender V4.3
|
#include <cmath>#include <cstring>#include "BLF_api.hh"#include "BLI_blenlib.h"#include "BLI_math_rotation.h"#include "BLI_utildefines.h"#include "IMB_imbuf_types.hh"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_scene.hh"#include "IMB_colormanagement.hh"#include "IMB_imbuf.hh"#include "GPU_framebuffer.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_matrix.hh"#include "GPU_viewport.hh"#include "ED_gpencil_legacy.hh"#include "ED_screen.hh"#include "ED_sequencer.hh"#include "ED_space_api.hh"#include "ED_util.hh"#include "BIF_glutil.hh"#include "SEQ_channels.hh"#include "SEQ_iterator.hh"#include "SEQ_prefetch.hh"#include "SEQ_proxy.hh"#include "SEQ_render.hh"#include "SEQ_select.hh"#include "SEQ_sequencer.hh"#include "SEQ_time.hh"#include "SEQ_transform.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "WM_api.hh"#include "WM_types.hh"#include "sequencer_intern.hh"#include "sequencer_quads_batch.hh"#include "sequencer_scopes.hh"Go to the source code of this file.
Variables | |
| static Sequence * | special_seq_update = nullptr |
|
static |
Definition at line 527 of file sequencer_preview_draw.cc.
References BLF_default(), BLF_width_and_height(), blender::ed::seq::ScopeHistogram::data, float, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, blender::ed::seq::ScopeHistogram::is_float_hist(), blender::ed::seq::ScopeHistogram::max_value, ratiof(), SNPRINTF_RLEN, UI_view2d_scale_get_inverse(), UI_view2d_text_cache_add(), and UI_view2d_text_cache_draw().
Referenced by sequencer_draw_scopes().
|
static |
Definition at line 634 of file sequencer_preview_draw.cc.
References BLF_default(), BLF_width_and_height(), BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_YUV_ITU_BT709, col, cosf, DEG2RADF, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, pos, rgb_float_to_uchar(), rgb_to_uv(), sinf, UI_view2d_scale_get_inverse(), UI_view2d_text_cache_add(), UI_view2d_text_cache_draw(), v, w(), float2::x, float2::y, and yuv_to_rgb().
Referenced by sequencer_draw_scopes().
|
static |
Definition at line 611 of file sequencer_preview_draw.cc.
References SNPRINTF, UI_view2d_text_cache_add(), and UI_view2d_text_cache_draw().
Referenced by sequencer_draw_scopes().
| void ED_sequencer_special_preview_clear | ( | ) |
Definition at line 87 of file sequencer_preview_draw.cc.
References sequencer_special_update_set().
Referenced by change_frame_seq_preview_end().
| Sequence * ED_sequencer_special_preview_get | ( | ) |
Definition at line 73 of file sequencer_preview_draw.cc.
References special_seq_update.
Referenced by change_frame_seq_preview_end(), draw_strip_offsets(), sequencer_ibuf_get(), and strip_data_highlight_flags_set().
Definition at line 78 of file sequencer_preview_draw.cc.
References CTX_data_scene(), CTX_wm_region(), find_nearest_seq(), and sequencer_special_update_set().
Referenced by change_frame_seq_preview_begin().
|
static |
Definition at line 604 of file sequencer_preview_draw.cc.
References BLI_YUV_ITU_BT709, rgb_to_yuv(), v, and y.
Referenced by draw_vectorscope_graticule().
|
static |
Definition at line 1007 of file sequencer_preview_draw.cc.
References 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_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform4f(), immUniformColor3f(), immUniformColor3fv(), immVertex2f(), immVertexFormat(), SpaceSeq::mainb, pos, SpaceSeq::preview_overlay, RGN_TYPE_PREVIEW, SELECT, SEQ_DRAW_IMG_HISTOGRAM, SEQ_DRAW_IMG_RGBPARADE, 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 296 of file sequencer_preview_draw.cc.
References NC_SCENE, ND_SEQUENCER, SEQ_prefetch_need_redraw(), and WM_event_add_notifier().
Referenced by sequencer_draw_preview().
|
static |
Definition at line 919 of file sequencer_preview_draw.cc.
References blender::ed::seq::ScopeHistogram::calc_from_ibuf(), blender::ed::seq::SeqScopes::cleanup(), ImBufFloatBuffer::data, draw_backdrop(), ImBuf::float_buffer, blender::ed::seq::SeqScopes::histogram, IMB_colormanagement_imbuf_make_display_space(), IMB_dupImBuf(), IMB_freeImBuf(), SpaceSeq::mainb, blender::ed::seq::SeqScopes::reference_ibuf, SpaceSeq::runtime, blender::ed::seq::SeqScopes::sep_waveform_ibuf, SEQ_DRAW_IMG_HISTOGRAM, SEQ_DRAW_IMG_IMBUF, SEQ_DRAW_IMG_RGBPARADE, SEQ_DRAW_IMG_VECTORSCOPE, SEQ_DRAW_IMG_WAVEFORM, sequencer_make_scope(), blender::ed::seq::SeqScopes::vector_ibuf, blender::ed::seq::SeqScopes::waveform_ibuf, SpaceSeq::zebra, and blender::ed::seq::SeqScopes::zebra_ibuf.
Referenced by sequencer_draw_preview().
Definition at line 188 of file sequencer_preview_draw.cc.
References float.
Referenced by sequencer_draw_preview(), and sequencer_preview_get_rect().
|
static |
Draw content and safety borders.
Definition at line 211 of file sequencer_preview_draw.cc.
References SequencerPreviewOverlay::flag, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_SHADER_3D_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, SEQ_PREVIEW_SHOW_SAFE_CENTER, SEQ_PREVIEW_SHOW_SAFE_MARGINS, TH_BACK, TH_VIEW_OVERLAY, View2D::tot, UI_draw_safe_areas(), UI_SCALE_FAC, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by sequencer_draw_preview().
|
static |
Definition at line 430 of file sequencer_preview_draw.cc.
References BLI_rctf_init(), data, draw_backdrop(), SpaceSeq::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, 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_SHADER_3D_IMAGE_COLOR, GPU_texture_bind(), GPU_texture_create_2d(), GPU_texture_filter_mode(), GPU_texture_free(), GPU_texture_unbind(), GPU_texture_update(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, GPU_vertformat_attr_add(), IMB_colormanagement_finish_glsl_draw(), IMB_display_buffer_release(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor3f(), immVertex2f(), immVertexFormat(), SpaceSeq::mainb, SpaceSeq::overlay_frame_type, pos, 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 978 of file sequencer_preview_draw.cc.
References SpaceSeq::draw_flag, Sequence::flag, G, G_TRANSFORM_SEQ, SELECT, SEQ_DRAW_TRANSFORM_PREVIEW, SEQ_LEFTSEL, SEQ_RIGHTSEL, and SEQ_select_active_get().
Referenced by draw_timeline_backdrop(), and sequencer_draw_preview().
Definition at line 990 of file sequencer_preview_draw.cc.
References BLI_assert, Sequence::flag, SEQ_RIGHTSEL, SEQ_select_active_get(), SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by draw_timeline_backdrop(), and sequencer_draw_preview().
|
static |
Definition at line 196 of file sequencer_preview_draw.cc.
References 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 1080 of file sequencer_preview_draw.cc.
References draw_backdrop(), 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, SpaceSeq::overlay_frame_type, SpaceSeq::preview_overlay, REGION_DRAW_POST_VIEW, SpaceSeq::render_size, SEQ_channels_displayed_get(), seq_draw_image_origin_and_outline(), SEQ_editing_get(), 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_calc_scopes(), 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_draw_scopes(), 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(), WM_draw_region_get_viewport(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by draw_timeline_backdrop(), and sequencer_preview_region_draw().
Definition at line 791 of file sequencer_preview_draw.cc.
References BLI_rctf_init(), BLI_rctf_resize_x(), BLI_rctf_resize_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, draw_histogram(), draw_vectorscope_graticule(), draw_waveform_graticule(), ELEM, SpaceSeq::flag, ImBuf::float_buffer, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_DATA_UBYTE, GPU_FETCH_FLOAT, GPU_PRIM_TRI_FAN, GPU_RGBA8, GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER, GPU_SHADER_3D_IMAGE_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_texture_bind(), GPU_texture_create_2d(), GPU_texture_extend_mode(), GPU_texture_filter_mode(), GPU_texture_free(), GPU_texture_unbind(), GPU_texture_update(), GPU_TEXTURE_USAGE_ATTACHMENT, GPU_TEXTURE_USAGE_SHADER_READ, GPU_vertformat_attr_add(), blender::ed::seq::SeqScopes::histogram, IMB_rect_from_float(), immAttr2f(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformColor3f(), immUniformColor4ubv(), immVertex2f(), immVertexFormat(), SpaceSeq::mainb, pos, SpaceSeq::runtime, blender::ed::seq::SeqScopes::sep_waveform_ibuf, SEQ_DRAW_IMG_HISTOGRAM, SEQ_DRAW_IMG_IMBUF, SEQ_DRAW_IMG_RGBPARADE, SEQ_DRAW_IMG_VECTORSCOPE, SEQ_DRAW_IMG_WAVEFORM, SEQ_USE_ALPHA, sequencer_preview_get_rect(), blender::ed::seq::SeqScopes::vector_ibuf, blender::ed::seq::SeqScopes::waveform_ibuf, ImBuf::x, rctf::xmax, rctf::xmin, ImBuf::y, rctf::ymax, rctf::ymin, and blender::ed::seq::SeqScopes::zebra_ibuf.
Referenced by sequencer_draw_preview().
| ImBuf * sequencer_ibuf_get | ( | const bContext * | C, |
| 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 92 of file sequencer_preview_draw.cc.
References BKE_scene_multiview_view_id_get(), SpaceSeq::chanshown, CTX_data_expect_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_space_seq(), depsgraph, ED_sequencer_special_preview_get(), fb(), SpaceSeq::flag, G, GPU_framebuffer_active_get(), GPU_framebuffer_bind(), GPU_framebuffer_restore(), GPU_viewport_bind(), GPU_viewport_unbind(), SpaceSeq::multiview_eye, SpaceSeq::render_size, 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, STEREO_RIGHT_ID, and WM_draw_region_get_bound_viewport().
Referenced by metadata_panel_context_draw(), sequencer_draw_preview(), and sequencer_sample_apply().
|
static |
Definition at line 170 of file sequencer_preview_draw.cc.
References IMB_colormanagement_imbuf_make_display_space(), IMB_dupImBuf(), IMB_freeImBuf(), and IMB_rectfill_alpha().
Referenced by sequencer_calc_scopes().
|
static |
Definition at line 303 of file sequencer_preview_draw.cc.
References BLI_assert_msg, ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::colorspace, ImBufFloatBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::dither, ED_draw_imbuf_method(), ImBuf::float_buffer, 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(), and IMB_display_buffer_acquire_ctx().
Referenced by sequencer_draw_display_buffer().
|
static |
Definition at line 384 of file sequencer_preview_draw.cc.
References TH_SEQ_PREVIEW, and UI_ThemeClearColor().
Referenced by sequencer_draw_preview().
|
static |
Definition at line 389 of file sequencer_preview_draw.cc.
References BLI_rctf_init(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), draw_backdrop(), fabsf, float, SpaceSeq::overlay_frame_type, SEQ_OVERLAY_FRAME_TYPE_RECT, sequencer_display_size(), View2D::tot, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by sequencer_draw_display_buffer(), and sequencer_draw_scopes().
| void sequencer_special_update_set | ( | Sequence * | seq | ) |
Definition at line 68 of file sequencer_preview_draw.cc.
References special_seq_update.
Referenced by ED_sequencer_special_preview_clear(), and ED_sequencer_special_preview_set().
Definition at line 371 of file sequencer_preview_draw.cc.
References CTX_wm_manager(), G, OB_RENDER, WM_JOB_TYPE_COMPOSITE, WM_JOB_TYPE_RENDER_PREVIEW, and WM_jobs_kill_type().
Referenced by sequencer_draw_preview().
|
static |
Definition at line 66 of file sequencer_preview_draw.cc.
Referenced by ED_sequencer_special_preview_get(), and sequencer_special_update_set().