126 short is_break =
G.is_break;
138 bmain,
depsgraph, scene, rectx, recty, render_size_mode,
nullptr, &context);
141 context.is_playing = screen->
animtimer !=
nullptr;
142 context.is_scrubbing = screen->
scrubbing;
177 G.is_break = is_break;
187 r_viewrect[0] *= render_data.
xasp / render_data.
yasp;
222 float viewport_size[4];
261 Mask *
mask = SEQ_active_mask_get(scene);
265 float aspx = 1.0f, aspy = 1.0f;
329 return texture_coord;
355 const float xmin = v2d.
tot.
xmin;
356 const float ymin = v2d.
tot.
ymin;
393 return texture_coord;
399 const float text_scale_x,
400 const float text_scale_y,
408 float text_width, text_height;
410 text_width *= text_scale_x;
411 text_height *= text_scale_y;
413 &v2d,
x - text_width / 2, area.
ymax - text_height * 1.3f, buf, buf_len,
color);
423 if (hist.
data.is_empty()) {
429 float text_scale_x, text_scale_y;
433 const float max_val = hdr ? 12.0f : 1.0f;
436 const uchar col_grid[4] = {128, 128, 128, 128};
437 for (
float val = 0.0f; val <= 1.0f; val += 0.25f) {
442 for (
float val = 2.0f; val <= max_val; val += 1.0f) {
450 add_vertical_line(max_val_r, {128, 0, 0, 128}, v2d, text_scale_x, text_scale_y, quads, area);
451 add_vertical_line(max_val_g, {0, 128, 0, 128}, v2d, text_scale_x, text_scale_y, quads, area);
452 add_vertical_line(max_val_b, {0, 0, 128, 128}, v2d, text_scale_x, text_scale_y, quads, area);
455 const float x_val_min = area.
xmin;
456 const float x_val_max = area.
xmin + (area.
xmax - area.
xmin) * max_val;
463 for (
int ch = 0; ch < 3; ++ch) {
467 uchar col_line[4] = {32, 32, 32, 255};
468 uchar col_area[4] = {64, 64, 64, 128};
472 float x_scale = (area.
xmax - area.
xmin);
473 float yb = area.
ymin;
474 for (
int bin = 0; bin <= hist.
max_bin[ch]; bin++) {
481 float x0 = area.
xmin + f0 * x_scale;
482 float x1 = area.
xmin + f1 * x_scale;
484 float y = area.
ymin + bin_val * y_scale;
485 quads.
add_quad(x0, yb, x0,
y, x1, yb, x1,
y, col_area);
508 const float lines[3] = {0.1f, 0.7f, 0.9f};
509 uchar col_grid[4] = {160, 64, 64, 128};
510 const float x0 = area.
xmin;
511 const float x1 = area.
xmax;
513 for (
int i = 0;
i < 3;
i++) {
521 uchar col_border[4] = {64, 64, 64, 128};
530 const float skin_rad =
DEG2RADF(123.0f);
535 const float radius = ((
w < h) ?
w : h) * 0.5f;
538 constexpr int circle_delta = 6;
539 constexpr int num_circle_points = 360 / circle_delta;
540 float2 circle_pos[num_circle_points];
541 float3 circle_col[num_circle_points];
542 for (
int i = 0;
i < num_circle_points;
i++) {
559 constexpr float alpha_f = 0.8f;
560 constexpr uchar alpha_b =
uchar(alpha_f * 255.0f);
561 const uchar4 col_center(50, 50, 50, alpha_b);
563 uchar4 col1(0, 0, 0, alpha_b);
564 uchar4 col2(0, 0, 0, alpha_b);
565 uchar4 col3(0, 0, 0, alpha_b);
569 constexpr float mul_background = 0.2f;
570 for (
int i = 0;
i < num_circle_points;
i += 2) {
572 int idx2 = (
i + 1) % num_circle_points;
573 int idx3 = (
i + 2) % num_circle_points;
574 float2 pt1 = center + circle_pos[idx1] * radius;
575 float2 pt2 = center + circle_pos[idx2] * radius;
576 float2 pt3 = center + circle_pos[idx3] * radius;
577 float3 rgb1 = circle_col[idx1] * mul_background;
578 float3 rgb2 = circle_col[idx2] * mul_background;
579 float3 rgb3 = circle_col[idx3] * mul_background;
598 const float outer_radius = radius * 1.02f;
599 for (
int i = 0;
i < num_circle_points;
i++) {
601 int idx2 = (
i + 1) % num_circle_points;
602 float2 pt1a = center + circle_pos[idx1] * radius;
603 float2 pt2a = center + circle_pos[idx2] * radius;
604 float2 pt1b = center + circle_pos[idx1] * outer_radius;
605 float2 pt2b = center + circle_pos[idx2] * outer_radius;
606 float3 rgb1 = circle_col[idx1];
607 float3 rgb2 = circle_col[idx2];
611 pt1a.x, pt1a.y, pt1b.x, pt1b.y, pt2a.x, pt2a.y, pt2b.x, pt2b.y, col1, col1, col2, col2);
618 const uchar4 col_grid(128, 128, 128, 128);
621 quads.
add_line(center.x - radius, center.y, center.x + radius, center.y, col_grid);
622 quads.
add_line(center.x, center.y - radius, center.x, center.y + radius, col_grid);
625 for (
int j = 1; j < 5; j++) {
626 float r = radius * j * 0.2f;
627 for (
int i = 0;
i < num_circle_points;
i++) {
629 int idx2 = (
i + 1) % num_circle_points;
630 float2 pt1 = center + circle_pos[idx1] * r;
631 float2 pt2 = center + circle_pos[idx2] * r;
632 quads.
add_line(pt1.x, pt1.y, pt2.x, pt2.y, col_grid);
637 const float3 primaries[6] = {
645 const char *names =
"RYGCBM";
648 char buf[2] = {
'M', 0};
649 float text_scale_x, text_scale_y;
651 float text_width, text_height;
653 text_width *= text_scale_x;
654 text_height *= text_scale_y;
656 const uchar4 col_target(128, 128, 128, 192);
657 const float delta = radius * 0.01f;
658 for (
int i = 0;
i < 6;
i++) {
659 float3 safe = primaries[
i] * 0.75f;
665 pos.x + delta * 1.2f + text_width / 4,
666 pos.y - text_height / 2,
673 const uchar4 col_tone(255, 102, 0, 128);
676 center.x +
cosf(skin_rad) * radius,
677 center.y +
sinf(skin_rad) * radius,
688 return "VSE Vectorscope";
690 return "VSE Waveform";
694 return "VSE Histogram";
696 return "VSE Overexposed";
713 scene, timeline_frame, 0);
714 if (input_texture ==
nullptr) {
716 scene, timeline_frame, space_sequencer.
chanshown);
733 uchar black[4] = {0, 0, 0, 255};
750 imm_format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
752 imm_format,
"texCoord", blender::gpu::VertAttrType::SFLOAT_32_32);
755 immUniform1i(
"img_premultiplied", premultiplied ? 1 : 0);
779 int viewport_size_i[4];
781 const int2 viewport_size =
int2(viewport_size_i[2], viewport_size_i[3]);
897 scene, timeline_frame, space_sequencer.
chanshown);
898 if (display_texture !=
nullptr) {
908 "seq_scope_display_buf", width, height, 1,
format, usage,
nullptr);
909 if (display_texture ==
nullptr) {
926 imm_format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
928 imm_format,
"texCoord", blender::gpu::VertAttrType::SFLOAT_32_32);
935 &view_settings, &display_settings, input_colorspace, 0.0f, predivide,
false))
938 const rctf position{0.0f, 1.0f, 0.0f, 1.0f};
939 const rctf texture_coord{0.0f, 1.0f, 0.0f, 1.0f};
951 scene, timeline_frame, space_sequencer.
chanshown, display_texture);
958 const int timeline_frame)
978 if (last_seq ==
nullptr) {
1001 return preview_frame;
1059 if (is_active_seq) {
1092 const int line_start = selection_start.y;
1093 const int line_end = selection_end.y;
1095 for (
int line_index = line_start; line_index <= line_end; line_index++) {
1100 if (line_index == selection_start.y) {
1101 character_start = line.
characters[selection_start.x];
1103 if (line_index == selection_end.y) {
1104 character_end = line.
characters[selection_end.x];
1107 const float line_y = character_start.
position.y +
text->font_descender;
1110 const float view_aspect = scene->
r.
xasp / scene->
r.
yasp;
1113 {character_start.
position.x, line_y},
1114 {character_start.
position.x, line_y +
text->line_height},
1123 selection_quad[
i] += view_offs;
1125 selection_quad[
i].x *= view_aspect;
1139 coords_view.x = std::round(coords_view.x);
1140 coords_view.y = std::round(coords_view.y);
1143 v2d, coords_view.x, coords_view.y, &coords_region_aligned.x, &coords_region_aligned.y);
1144 return coords_region_aligned;
1154 const float view_aspect = scene->
r.
xasp / scene->
r.
yasp;
1157 data->cursor_offset);
1158 const float cursor_width = 10;
1160 text->lines[cursor_position.y].characters[cursor_position.x].position;
1163 const float bound_left =
float(
text->text_boundbox.xmin) +
U.pixelsize;
1164 const float bound_right =
float(
text->text_boundbox.xmax) - (cursor_width +
U.pixelsize);
1166 cursor_coords.x = std::max(cursor_coords.x, bound_left);
1167 cursor_coords.x = std::min(cursor_coords.x, bound_right);
1172 {cursor_coords.x, cursor_coords.y},
1173 {cursor_coords.x, cursor_coords.y +
text->line_height},
1174 {cursor_coords.x + cursor_width, cursor_coords.y +
text->line_height},
1175 {cursor_coords.x + cursor_width, cursor_coords.y},
1183 cursor_quad[
i] += descender_offs + view_offs;
1185 cursor_quad[
i].x *= view_aspect;
1206 format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
1253 viewport, &view_settings, &display_settings, render_data.
dither_intensity);
1288 float col[4] = {0, 0, 0, 0};
1311 const rctf &position,
1312 const rctf &texture_coord)
1316 imm_format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
1318 imm_format,
"texCoord", blender::gpu::VertAttrType::SFLOAT_32_32);
1338 const char *texture_colorspace_name,
1339 const bool predivide,
1340 const rctf &position,
1341 const rctf &texture_coord)
1345 imm_format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
1347 imm_format,
"texCoord", blender::gpu::VertAttrType::SFLOAT_32_32);
1371 const int timeline_frame)
1375 scene, channels, editing.current_strips(), timeline_frame, 0);
1377 for (
Strip *strip : strips) {
1410 float original_proj[4][4];
1426 format,
"color", blender::gpu::VertAttrType::SFLOAT_32_32_32);
1431 const float f5 = 0.25f;
1432 const float f10 = 0.5f;
1433 const float f20 = 1.0f;
1435 const float red[3] = {1.0f, 0.0f, 0.0f};
1436 const float white[3] = {1.0f, 1.0f, 1.0f};
1438 const int segments = 16;
1440 for (
int i = 0;
i < segments + 1;
i++) {
1450 float crosshair_color[3];
1510 texture_format = blender::gpu::TextureFormat::SFLOAT_32;
1513 texture_format = blender::gpu::TextureFormat::SFLOAT_32_32_32;
1516 texture_format = blender::gpu::TextureFormat::SFLOAT_32_32_32_32;
1519 BLI_assert_msg(0,
"Incompatible number of channels for float buffer in sequencer");
1524 "seq_display_buf", ibuf.
x, ibuf.
y, 1, texture_format, texture_usage,
nullptr);
1534 blender::gpu::TextureFormat::UNORM_8_8_8_8,
1581 const ImBuf *current_ibuf,
1583 const ImBuf *reference_ibuf,
1588 if (current_texture) {
1595 *current_texture, texture_colorspace, predivide, position, texture_coord);
1598 if (reference_texture) {
1605 *reference_texture, texture_colorspace, predivide, position, texture_coord);
1639 const ImBuf *input_ibuf,
1640 const int timeline_frame)
1645 const bool has_gpu_scope = input_ibuf && current_texture &&
1647 space_sequencer.
zebra != 0) ||
1656 if (has_cpu_scope) {
1658 space_sequencer, view_settings, display_settings, *input_ibuf, timeline_frame);
1660 if (has_gpu_scope) {
1672 if (has_cpu_scope || has_gpu_scope) {
1690 if (current_texture) {
1695 if (reference_texture) {
1710 imm_format,
"pos", blender::gpu::VertAttrType::SFLOAT_32_32);
1723 if (show_preview_image && input_ibuf) {
1748 if ((is_playing ==
false) && show_preview_image &&
is_cursor_visible(space_sequencer)) {
1765 int xoffset = rect->
xmin +
U.widget_unit;
1766 int yoffset = rect->
ymax;
1771 float text_color[4] = {1, 1, 1, 1}, shadow_color[4] = {0, 0, 0, 0.8f};
1791 if (
G.is_rendering || !scene || !scene->
ed ||
1814 const bool need_current_frame = !(draw_frame_overlay && (space_sequencer.
overlay_frame_type ==
1816 const bool need_reference_frame = show_imbuf && draw_frame_overlay &&
1820 int timeline_frame = render_data.
cfra;
1835 ImBuf *current_ibuf =
nullptr;
1836 ImBuf *reference_ibuf =
nullptr;
1838 if (need_reference_frame) {
1841 C, timeline_frame + offset, view_names[space_sequencer.
multiview_eye]);
1842 if (show_imbuf && reference_ibuf) {
1846 if (need_current_frame) {
1849 if (use_gpu_texture && current_ibuf) {
1851 scene, timeline_frame, space_sequencer.
chanshown);
1852 if (current_texture ==
nullptr) {
1855 scene, timeline_frame, space_sequencer.
chanshown, current_texture);
1861 ImBuf *overlay_ibuf = need_current_frame ? current_ibuf : reference_ibuf;
1868 show_imbuf ? current_texture :
nullptr,
1870 show_imbuf ? reference_texture :
nullptr);
1885 sequencer_draw_maskedit(
C, scene, region, sseq);
1890 if (reference_texture) {
Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
bScreen * CTX_wm_screen(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
Scene * CTX_data_sequencer_scene(const bContext *C)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
int BKE_scene_multiview_view_id_get(const RenderData *rd, const char *viewname)
void BLF_enable(int fontid, FontFlags flag)
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
void BLF_width_and_height(int fontid, const char *str, size_t str_len, float *r_width, float *r_height) ATTR_NONNULL()
void BLF_color4fv(int fontid, const float rgba[4])
void BLF_shadow_offset(int fontid, int x, int y)
void BLF_disable(int fontid, FontFlags flag)
blender::ocio::ColorSpace ColorSpace
#define BLI_assert_msg(a, msg)
MINLINE float ratiof(float min, float max, float pos)
#define BLI_YUV_ITU_BT709
MINLINE void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
void rgb_to_yuv(float r, float g, float b, float *r_y, float *r_u, float *r_v, int colorspace)
void yuv_to_rgb(float y, float u, float v, float *r_r, float *r_g, float *r_b, int colorspace)
static constexpr int image_width
static constexpr int image_height
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define SNPRINTF_UTF8_RLEN(dst, format,...)
#define STEREO_RIGHT_NAME
struct TextVarsRuntime TextVarsRuntime
@ SEQ_EDIT_OVERLAY_FRAME_ABS
@ SEQ_EDIT_OVERLAY_FRAME_SHOW
eSpaceSeq_Proxy_RenderSize
@ SEQ_VIEW_SEQUENCE_PREVIEW
@ SEQ_PREVIEW_SHOW_METADATA
@ SEQ_PREVIEW_SHOW_GPENCIL
@ SEQ_PREVIEW_SHOW_SAFE_MARGINS
@ SEQ_PREVIEW_SHOW_OUTLINE_SELECTED
@ SEQ_PREVIEW_SHOW_SAFE_CENTER
@ SEQ_PREVIEW_SHOW_2D_CURSOR
@ SEQ_DRAW_TRANSFORM_PREVIEW
@ SEQ_OVERLAY_FRAME_TYPE_RECT
@ SEQ_OVERLAY_FRAME_TYPE_CURRENT
@ SEQ_OVERLAY_FRAME_TYPE_REFERENCE
@ SEQ_DRAW_IMG_VECTORSCOPE
void ED_mask_draw_region(Depsgraph *depsgraph, Mask *mask, ARegion *region, bool show_overlays, char draw_flag, char draw_type, eMaskOverlayMode overlay_mode, float blend_factor, int width_i, int height_i, float aspx, float aspy, bool do_scale_applied, bool do_draw_cb, float stabmat[4][4], const bContext *C)
const rcti * ED_region_visible_rect(ARegion *region)
bScreen * ED_screen_animation_no_scrub(const wmWindowManager *wm)
void ED_region_pixelspace(const ARegion *region)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
#define REGION_DRAW_POST_VIEW
void ED_region_image_metadata_draw(int x, int y, const ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy)
void ED_scene_draw_fps(const Scene *scene, int xoffset, int *yoffset)
#define GPU_batch_uniform_1f(batch, name, x)
void GPU_batch_discard(blender::gpu::Batch *batch)
void GPU_batch_draw(blender::gpu::Batch *batch)
blender::gpu::Batch * GPU_batch_create_procedural(GPUPrimType primitive_type, int32_t vertex_count)
void GPU_batch_set_shader(blender::gpu::Batch *batch, blender::gpu::Shader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
#define GPU_batch_uniform_1i(batch, name, x)
void GPU_compute_dispatch(blender::gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
void GPU_debug_group_end()
void GPU_debug_group_begin(const char *name)
#define GPU_FRAMEBUFFER_FREE_SAFE(fb)
#define GPU_ATTACHMENT_TEXTURE(_texture)
void GPU_framebuffer_restore()
#define GPU_ATTACHMENT_NONE
void GPU_framebuffer_bind_no_srgb(blender::gpu::FrameBuffer *fb)
void GPU_framebuffer_clear_color(blender::gpu::FrameBuffer *fb, const float clear_col[4])
#define GPU_framebuffer_ensure_config(_fb,...)
void GPU_framebuffer_bind(blender::gpu::FrameBuffer *fb)
blender::gpu::FrameBuffer * GPU_framebuffer_active_get()
void GPU_matrix_ortho_set(float left, float right, float bottom, float top, float near, float far)
void GPU_matrix_identity_set()
void GPU_matrix_scale_2f(float x, float y)
void GPU_matrix_push_projection()
void GPU_matrix_pop_projection()
#define GPU_matrix_projection_get(x)
#define GPU_matrix_projection_set(x)
void GPU_matrix_translate_2f(float x, float y)
void GPU_shader_uniform_1b(blender::gpu::Shader *sh, const char *name, bool value)
void GPU_shader_uniform_1f(blender::gpu::Shader *sh, const char *name, float value)
int GPU_shader_get_sampler_binding(blender::gpu::Shader *shader, const char *name)
void GPU_shader_uniform_3fv(blender::gpu::Shader *sh, const char *name, const float data[3])
void GPU_shader_bind(blender::gpu::Shader *shader, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
int GPU_shader_get_ssbo_binding(blender::gpu::Shader *shader, const char *name)
void GPU_shader_uniform_1i(blender::gpu::Shader *sh, const char *name, int value)
blender::gpu::Shader * GPU_shader_get_builtin_shader(GPUBuiltinShader shader)
@ GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_SEQUENCER_SCOPE_RASTER
@ GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA
@ GPU_SHADER_3D_POLYLINE_FLAT_COLOR
@ GPU_SHADER_SEQUENCER_ZEBRA
@ GPU_SHADER_SEQUENCER_SCOPE_RESOLVE
@ GPU_SHADER_3D_IMAGE_COLOR
@ GPU_BARRIER_SHADER_STORAGE
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
@ GPU_BLEND_OVERLAY_MASK_FROM_ALPHA
void GPU_depth_mask(bool depth)
void GPU_blend(GPUBlend blend)
void GPU_depth_test(GPUDepthTest test)
void GPU_color_mask(bool r, bool g, bool b, bool a)
void GPU_viewport_size_get_i(int coords[4])
void GPU_memory_barrier(GPUBarrier barrier)
void GPU_viewport_size_get_f(float coords[4])
void GPU_storagebuf_free(blender::gpu::StorageBuf *ssbo)
blender::gpu::StorageBuf * GPU_storagebuf_create_ex(size_t size, const void *data, GPUUsageType usage, const char *name)
void GPU_storagebuf_clear_to_zero(blender::gpu::StorageBuf *ssbo)
void GPU_storagebuf_bind(blender::gpu::StorageBuf *ssbo, int slot)
void GPU_storagebuf_unbind(blender::gpu::StorageBuf *ssbo)
int GPU_texture_height(const blender::gpu::Texture *texture)
void GPU_texture_unbind(blender::gpu::Texture *texture)
int GPU_texture_width(const blender::gpu::Texture *texture)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
blender::gpu::Texture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, blender::gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
void GPU_texture_filter_mode(blender::gpu::Texture *texture, bool use_filter)
void GPU_texture_bind(blender::gpu::Texture *texture, int unit)
void GPU_texture_free(blender::gpu::Texture *texture)
void GPU_texture_update(blender::gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
void GPU_viewport_bind(GPUViewport *viewport, int view, const rcti *rect)
blender::gpu::FrameBuffer * GPU_viewport_framebuffer_overlay_get(GPUViewport *viewport)
blender::gpu::FrameBuffer * GPU_viewport_framebuffer_render_get(GPUViewport *viewport)
void GPU_viewport_colorspace_set(GPUViewport *viewport, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float dither)
void GPU_viewport_unbind(GPUViewport *viewport)
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
@ COLOR_ROLE_DEFAULT_BYTE
@ COLOR_ROLE_SCENE_LINEAR
bool IMB_colormanagement_display_processor_needed(const ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
const char * IMB_colormanagement_colorspace_get_name(const ColorSpace *colorspace)
const char * IMB_colormanagement_role_colorspace_name_get(int role)
void IMB_colormanagement_finish_glsl_draw()
BLI_INLINE void IMB_colormanagement_get_luminance_coefficients(float r_rgb[3])
bool IMB_colormanagement_setup_glsl_draw_to_scene_linear(const char *from_colorspace_name, bool predivide)
bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, const ColorSpace *from_colorspace, float dither, bool predivide, bool do_overlay_merge)
void IMB_freeImBuf(ImBuf *ibuf)
void UI_draw_safe_areas(uint pos, const rctf *rect, const float title_aspect[2], const float action_aspect[2])
void UI_GetThemeColor3fv(int colorid, float col[3])
void UI_ThemeClearColor(int colorid)
void UI_view2d_curRect_validate(View2D *v2d)
void UI_view2d_scale_get_inverse(const View2D *v2d, float *r_x, float *r_y)
char char char char void UI_view2d_text_cache_add(View2D *v2d, float x, float y, const char *str, size_t str_len, const unsigned char col[4])
void UI_view2d_view_restore(const bContext *C)
void UI_view2d_text_cache_draw(ARegion *region)
void UI_view2d_totRect_set(View2D *v2d, int width, int height)
void UI_view2d_view_ortho(const View2D *v2d)
View2D * UI_view2d_fromcontext(const bContext *C)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_view_to_region(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
@ WM_JOB_TYPE_RENDER_PREVIEW
@ WM_GIZMOMAP_DRAWSTEP_2D
void ED_annotation_draw_2dimage(const bContext *C)
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMVert * v
BPy_StructRNA * depsgraph
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
constexpr int64_t first() const
constexpr int64_t last(const int64_t n=0) const
void add_quad(float x1, float y1, float x2, float y2, const uchar color[4])
void add_line(float x1, float y1, float x2, float y2, const uchar color[4])
void add_wire_quad(float x1, float y1, float x2, float y2, const uchar color[4])
struct @021025263243242147216143265077100330027142264337::@225245033123204053237120173316075113304004012000 batch
struct @021025263243242147216143265077100330027142264337::@240232116316110053135047106323056371161236243121 attr_id
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
BLI_INLINE float fb(float length, float L)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
blender::IndexRange strip_text_selection_range_get(const TextVars *data)
static Strip * special_seq_update
static void sequencer_draw_scopes(Scene *scene, const SpaceSeq &space_sequencer, ARegion ®ion, int timeline_frame, int image_width, int image_height, bool premultiplied)
static int sequencer_draw_get_transform_preview_frame(const Scene *scene)
static void preview_draw_end(const bContext *C)
static void preview_draw_color_render_begin(ARegion ®ion)
static void text_selection_draw(const bContext *C, const Strip *strip, uint pos)
static void draw_cursor_2d(const ARegion *region, const blender::float2 &cursor)
static void sequencer_preview_clear()
bool sequencer_text_editing_active_poll(bContext *C)
static void preview_draw_overlay_begin(ARegion ®ion)
static bool sequencer_draw_get_transform_preview(const SpaceSeq &sseq, const Scene &scene)
void special_preview_clear()
static rctf preview_get_reference_position(const SpaceSeq &space_sequencer, const Editing &editing, const ARegion ®ion)
static void text_edit_draw(const bContext *C)
static void draw_registered_callbacks(const bContext *C, ARegion ®ion)
static rctf preview_get_full_position(const ARegion ®ion)
static void sequencer_preview_draw_empty(ARegion ®ion)
static const char * get_scope_debug_name(eSpaceSeq_RegionType type)
static bool check_scope_needs_input_texture(const SpaceSeq &sseq)
static rctf preview_get_full_texture_coord()
void sequencer_preview_region_draw(const bContext *C, ARegion *region)
static void draw_histogram(ARegion ®ion, const ScopeHistogram &hist, SeqQuadsBatch &quads, const rctf &area)
static void update_cpu_scopes(const SpaceSeq &space_sequencer, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, const ImBuf &ibuf, const int timeline_frame)
static void draw_waveform_graticule(ARegion *region, SeqQuadsBatch &quads, const rctf &area)
static void sequencer_stop_running_jobs(const bContext *C, Scene *scene)
static void preview_draw_all_image_overlays(const bContext *C, const Scene *scene, const Editing &editing, const int timeline_frame)
static void draw_vectorscope_graticule(ARegion *region, SeqQuadsBatch &quads, const rctf &area)
static blender::gpu::Texture * create_texture(const ImBuf &ibuf)
static rctf preview_get_reference_texture_coord(const SpaceSeq &space_sequencer, const Editing &editing)
static void text_edit_draw_cursor(const bContext *C, const Strip *strip, uint pos)
Strip * strip_under_mouse_get(const Scene *scene, const View2D *v2d, const int mval[2])
Strip * special_preview_get()
static void add_vertical_line(const float val, const uchar4 color, View2D &v2d, const float text_scale_x, const float text_scale_y, SeqQuadsBatch &quads, const rctf &area)
bool sequencer_view_preview_only_poll(const bContext *C)
void sequencer_special_update_set(Strip *strip)
void special_preview_set(bContext *C, const int mval[2])
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)
bool check_show_imbuf(const SpaceSeq &sseq)
static void sequencer_draw_gpencil_overlay(const bContext *C)
blender::int2 strip_text_cursor_offset_to_position(const TextVarsRuntime *text, int cursor_offset)
static void sequencer_preview_draw_color_render(const SpaceSeq &space_sequencer, const Editing &editing, ARegion ®ion, const ImBuf *current_ibuf, blender::gpu::Texture *current_texture, const ImBuf *reference_ibuf, blender::gpu::Texture *reference_texture)
static blender::float2 coords_region_view_align(const View2D *v2d, const blender::float2 coords)
static int get_reference_frame_offset(const Editing &editing, const RenderData &render_data)
static void sequencer_preview_draw_overlays(const bContext *C, const wmWindowManager &wm, Scene *scene, const SpaceSeq &space_sequencer, const Editing &editing, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, ARegion ®ion, blender::gpu::Texture *current_texture, blender::gpu::Texture *reference_texture, const ImBuf *input_ibuf, const int timeline_frame)
ImBuf * sequencer_ibuf_get(const bContext *C, int timeline_frame, const char *viewname)
static blender::float2 rgb_to_uv_scaled(const blender::float3 &rgb)
static void preview_draw_texture_simple(blender::gpu::Texture &texture, const rctf &position, const rctf &texture_coord)
static void strip_draw_image_origin_and_outline(const bContext *C, Strip *strip, bool is_active_seq)
static void update_gpu_scopes(const ImBuf *input_ibuf, gpu::Texture *input_texture, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, const SpaceSeq &space_sequencer, Scene *scene, int timeline_frame)
static const char * get_texture_colorspace_name(const ImBuf &ibuf)
static void sequencer_display_size(const RenderData &render_data, float r_viewrect[2])
static void preview_draw_texture_to_linear(blender::gpu::Texture &texture, const char *texture_colorspace_name, const bool predivide, const rctf &position, const rctf &texture_coord)
static void preview_draw_begin(const bContext *C, const RenderData &render_data, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, ARegion ®ion, eSpaceSeq_RegionType preview_type)
static bool is_cursor_visible(const SpaceSeq &sseq)
T clamp(const T &a, const T &min, const T &max)
T reduce_max(const VecBase< T, Size > &a)
VecBase< T, Size > divide_ceil(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
T interpolate(const T &a, const T &b, const FactorT &t)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
Array< float2 > image_transform_final_quad_get(const Scene *scene, const Strip *strip)
ImBuf * render_give_ibuf(const RenderData *context, float timeline_frame, int chanshown)
ListBase * channels_displayed_get(const Editing *ed)
bool prefetch_need_redraw(const bContext *C, Scene *scene)
float3x3 image_transform_matrix_get(const Scene *scene, const Strip *strip)
Editing * editing_get(const Scene *scene)
float get_render_scale_factor(eSpaceSeq_Proxy_RenderSize render_size, short scene_render_scale)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void preview_cache_set_gpu_display_texture(Scene *scene, int timeline_frame, int display_channel, gpu::Texture *texture)
Strip * select_active_get(const Scene *scene)
void render_new_render_data(Main *bmain, Depsgraph *depsgraph, Scene *scene, int rectx, int recty, eSpaceSeq_Proxy_RenderSize preview_render_size, Render *render, RenderData *r_context)
gpu::Texture * preview_cache_get_gpu_texture(Scene *scene, int timeline_frame, int display_channel)
void preview_cache_set_gpu_texture(Scene *scene, int timeline_frame, int display_channel, gpu::Texture *texture)
bool effects_can_render_text(const Strip *strip)
float2 image_transform_origin_offset_pixelspace_get(const Scene *scene, const Strip *strip)
VectorSet< Strip * > query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
float2 image_preview_unit_to_px(const Scene *scene, const float2 co_src)
ImBuf * render_give_ibuf_direct(const RenderData *context, float timeline_frame, Strip *strip)
gpu::Texture * preview_cache_get_gpu_display_texture(Scene *scene, int timeline_frame, int display_channel)
blender::VecBase< uint8_t, 4 > uchar4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
MatBase< float, 3, 3 > float3x3
VecBase< float, 3 > float3
ARegionRuntimeHandle * runtime
const ColorSpace * colorspace
const ColorSpace * colorspace
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
ColorManagedViewSettings view_settings
struct DisplaySafeAreas safe_areas
ColorManagedDisplaySettings display_settings
SpaceSeq_Runtime * runtime
struct SequencerPreviewOverlay preview_overlay
struct wmTimer * animtimer
void calc_from_ibuf(const ImBuf *ibuf, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings)
static float bin_to_float(int bin)
static constexpr float VECSCOPE_V_SCALE
static constexpr float VECSCOPE_U_SCALE
Vector< CharInfo > characters
GPUViewport * WM_draw_region_get_bound_viewport(ARegion *region)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)