|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_color.h"#include "BLI_rect.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_mask.h"#include "DNA_mask_types.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "ED_clip.hh"#include "ED_mask.hh"#include "ED_screen.hh"#include "ED_space_api.hh"#include "BIF_glutil.hh"#include "GPU_immediate.hh"#include "GPU_matrix.hh"#include "GPU_shader.hh"#include "GPU_state.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "DEG_depsgraph_query.hh"Go to the source code of this file.
Functions | |
| static void | mask_spline_color_get (MaskLayer *mask_layer, MaskSpline *spline, const bool is_sel, uchar r_rgb[4]) |
| static void | mask_spline_feather_color_get (MaskLayer *, MaskSpline *, const bool is_sel, uchar r_rgb[4]) |
| static void | mask_point_undistort_pos (SpaceClip *sc, float r_co[2], const float co[2]) |
| static void | draw_single_handle (const MaskLayer *mask_layer, const MaskSplinePoint *point, const eMaskWhichHandle which_handle, const int draw_type, const float handle_size, const float point_pos[2], const float handle_pos[2]) |
| static void | draw_spline_points (const bContext *C, MaskLayer *mask_layer, MaskSpline *spline, const char draw_type) |
| static void | mask_color_active_tint (uchar r_rgb[4], const uchar rgb[4], const bool is_active) |
| static void | mask_draw_array (uint pos, GPUPrimType prim_type, const float(*points)[2], uint vertex_len) |
| static void | mask_draw_curve_type (const bContext *C, MaskSpline *spline, float(*orig_points)[2], int tot_point, const bool is_feather, const bool is_active, const uchar rgb_spline[4], const char draw_type) |
| static void | draw_spline_curve (const bContext *C, MaskLayer *mask_layer, MaskSpline *spline, const char draw_type, const bool is_active, const int width, const int height) |
| static void | draw_layer_splines (const bContext *C, MaskLayer *layer, const char draw_type, const int width, const int height, const bool is_active) |
| static void | draw_mask_layers (const bContext *C, Mask *mask, const char draw_type, const int width, const int height) |
| static float * | mask_rasterize (Mask *mask, const int width, const int height) |
| void | ED_mask_draw_region (Depsgraph *depsgraph, Mask *mask_, ARegion *region, const char draw_flag, const char draw_type, const eMaskOverlayMode overlay_mode, const float blend_factor, const int width_i, const int height_i, const float aspx, const float aspy, const bool do_scale_applied, const bool do_draw_cb, float stabmat[4][4], const bContext *C) |
| void | ED_mask_draw_frames (Mask *mask, ARegion *region, const int cfra, const int sfra, const int efra) |
|
static |
Definition at line 564 of file mask_draw.cc.
References draw_spline_curve(), draw_spline_points(), LISTBASE_FOREACH, and MASK_HIDE_SELECT.
Referenced by draw_mask_layers().
|
static |
Definition at line 592 of file mask_draw.cc.
References draw_layer_splines(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_program_point_size(), LISTBASE_FOREACH_INDEX, and MASK_HIDE_VIEW.
Referenced by ED_mask_draw_region().
|
static |
Definition at line 87 of file mask_draw.cc.
References MaskLayer::act_point, ELEM, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_ALIGN_DOUBLESIDE, HD_AUTO, HD_FREE, HD_VECT, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform4fv(), immUniformColor3fvAlpha(), immUniformColor3ubv(), immUniformThemeColor3(), immVertex2fv(), immVertexFormat(), MASK_DT_OUTLINE, MASK_WHICH_HANDLE_LEFT, MASK_WHICH_HANDLE_STICK, MASKPOINT_ISSEL_HANDLE, pos, TH_HANDLE_ALIGN, TH_HANDLE_AUTO, TH_HANDLE_FREE, TH_HANDLE_VERTEX, TH_HANDLE_VERTEX_SELECT, and UI_GetThemeColor3fv().
Referenced by draw_spline_points().
|
static |
Definition at line 497 of file mask_draw.cc.
References add_v2_v2v2(), BKE_mask_spline_differentiate_with_resolution(), BKE_mask_spline_feather_differentiated_points_with_resolution(), BKE_mask_spline_feather_resolution(), BKE_mask_spline_resolution(), BLI_assert, float, GPU_line_smooth(), mask_draw_curve_type(), MASK_HIDE_SELECT, mask_spline_color_get(), mask_spline_feather_color_get(), MASK_SPLINE_NOFILL, max_ii(), MEM_freeN(), SELECT, sub_v2_v2v2(), and MaskLayer::visibility_flag.
Referenced by draw_layer_splines().
|
static |
Definition at line 171 of file mask_draw.cc.
References MaskLayer::act_point, MaskLayer::act_spline, MaskSplinePoint::bezt, BKE_mask_point_handle(), BKE_mask_point_handles_mode_get(), BKE_mask_spline_feather_points(), BKE_mask_spline_point_array(), SpaceClip::clip, copy_v2_v2(), CTX_wm_space_clip(), draw_single_handle(), float, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_PRIM_POINTS, GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform4f(), immUniformColor3f(), immUniformThemeColorShadeAlpha(), immVertex2f(), immVertex2fv(), immVertexFormat(), INIT_MINMAX2, MASK_HANDLE_MODE_STICK, MASK_HIDE_SELECT, mask_point_undistort_pos(), mask_spline_color_get(), MASK_WHICH_HANDLE_LEFT, MASK_WHICH_HANDLE_RIGHT, MASK_WHICH_HANDLE_STICK, MASKPOINT_ISSEL_ANY, MASKPOINT_ISSEL_KNOT, MCLIP_PROXY_RENDER_UNDISTORT, MEM_freeN(), min, minmax_v2v2_v2(), pos, MovieClipUser::render_flag, SELECT, TH_HANDLE_VERTEX, TH_HANDLE_VERTEX_SELECT, TH_HANDLE_VERTEX_SIZE, UI_GetThemeValuef(), SpaceClip::user, BezTriple::vec, and MaskLayer::visibility_flag.
Referenced by draw_layer_splines().
| void ED_mask_draw_frames | ( | Mask * | mask, |
| ARegion * | region, | ||
| const int | cfra, | ||
| const int | sfra, | ||
| const int | efra ) |
Definition at line 771 of file mask_draw.cc.
References BKE_mask_layer_active(), BLI_listbase_count(), ED_region_visible_rect(), float, GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4ub(), immVertex2i(), immVertexFormat(), LISTBASE_FOREACH, pos, MaskLayer::splines_shapes, UI_SCALE_FAC, and rcti::ymin.
Referenced by draw_image_cache(), and draw_movieclip_cache().
| void ED_mask_draw_region | ( | Depsgraph * | depsgraph, |
| Mask * | mask, | ||
| ARegion * | region, | ||
| 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 ) |
Sets up the opengl context. width, height are to match the values from ED_mask_get_size().
Definition at line 640 of file mask_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), DEG_get_evaluated_id(), depsgraph, draw_mask_layers(), ED_region_draw_cb_draw(), float, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_matrix_mul, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_R16F, GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR, GPU_shader_get_uniform(), GPU_shader_uniform_float_ex(), Mask::id, immDrawPixelsTexSetup(), immDrawPixelsTexTiled(), MASK_DRAWFLAG_OVERLAY, MASK_DRAWFLAG_SPLINE, MASK_OVERLAY_ALPHACHANNEL, MASK_OVERLAY_COMBINED, mask_rasterize(), max_ff(), MEM_freeN(), REGION_DRAW_POST_VIEW, REGION_DRAW_PRE_VIEW, state, View2D::tot, UI_view2d_view_to_region(), x, rctf::xmin, y, and rctf::ymin.
Referenced by clip_main_region_draw(), and image_main_region_draw().
|
static |
Definition at line 349 of file mask_draw.cc.
Referenced by mask_draw_curve_type().
|
static |
Definition at line 362 of file mask_draw.cc.
References immBegin(), immEnd(), immVertex2fv(), and pos.
Referenced by mask_draw_curve_type().
|
static |
Definition at line 374 of file mask_draw.cc.
References BLI_assert, SpaceClip::clip, CTX_wm_space_clip(), float, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINE_LOOP, GPU_PRIM_LINE_STRIP, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBindBuiltinProgram(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4fv(), immUniformColor4ubv(), immVertexFormat(), mask_color_active_tint(), mask_draw_array(), MASK_DT_BLACK, MASK_DT_DASH, MASK_DT_OUTLINE, MASK_DT_WHITE, mask_point_undistort_pos(), MASK_SPLINE_CYCLIC, MCLIP_PROXY_RENDER_UNDISTORT, MEM_freeN(), pos, MovieClipUser::render_flag, rgba_uchar_to_float(), UI_SCALE_FAC, and SpaceClip::user.
Referenced by draw_spline_curve().
Definition at line 80 of file mask_draw.cc.
References BKE_mask_coord_from_movieclip(), BKE_mask_coord_to_movieclip(), SpaceClip::clip, ED_clip_point_undistorted_pos(), and SpaceClip::user.
Referenced by draw_spline_points(), and mask_draw_curve_type().
Definition at line 623 of file mask_draw.cc.
References BKE_maskrasterize_buffer(), BKE_maskrasterize_handle_free(), BKE_maskrasterize_handle_init(), and BKE_maskrasterize_handle_new().
Referenced by ED_mask_draw_region().
|
static |
Definition at line 41 of file mask_draw.cc.
References MaskLayer::act_spline.
Referenced by draw_spline_curve(), and draw_spline_points().
|
static |
Definition at line 63 of file mask_draw.cc.
Referenced by draw_spline_curve().