|
Blender V5.0
|
#include "DNA_mask_types.h"Go to the source code of this file.
Functions | |
| bool | ED_maskedit_poll (bContext *C) |
| bool | ED_maskedit_visible_splines_poll (bContext *C) |
| bool | ED_maskedit_mask_poll (bContext *C) |
| bool | ED_maskedit_mask_visible_splines_poll (bContext *C) |
| void | ED_mask_deselect_all (const bContext *C) |
| void | ED_operatortypes_mask () |
| void | ED_keymap_mask (wmKeyConfig *keyconf) |
| void | ED_operatormacros_mask () |
| void | ED_mask_get_size (ScrArea *area, int *r_width, int *r_height) |
| void | ED_mask_zoom (ScrArea *area, ARegion *region, float *r_zoomx, float *r_zoomy) |
| void | ED_mask_get_aspect (ScrArea *area, ARegion *region, float *r_aspx, float *r_aspy) |
| void | ED_mask_pixelspace_factor (ScrArea *area, ARegion *region, float *r_scalex, float *r_scaley) |
| void | ED_mask_mouse_pos (ScrArea *area, ARegion *region, const int mval[2], float r_co[2]) |
| void | ED_mask_point_pos (ScrArea *area, ARegion *region, float x, float y, float *r_x, float *r_y) |
| void | ED_mask_point_pos__reverse (ScrArea *area, ARegion *region, float x, float y, float *r_x, float *r_y) |
| void | ED_mask_cursor_location_get (ScrArea *area, float cursor[2]) |
| bool | ED_mask_selected_minmax (const bContext *C, float min[2], float max[2], bool handles_as_control_point) |
| void | ED_mask_center_from_pivot_ex (const bContext *C, ScrArea *area, float r_center[2], char mode, bool *r_has_select) |
| 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) |
| void | ED_mask_draw_frames (Mask *mask, ARegion *region, int cfra, int sfra, int efra) |
| void | ED_mask_layer_shape_auto_key (MaskLayer *mask_layer, int frame) |
| bool | ED_mask_layer_shape_auto_key_all (Mask *mask, int frame) |
| bool | ED_mask_layer_shape_auto_key_select (Mask *mask, int frame) |
| bool | ED_masklayer_frames_looper (MaskLayer *mask_layer, Scene *scene, bool(*mask_layer_shape_cb)(MaskLayerShape *, Scene *)) |
| void | ED_masklayer_make_cfra_list (MaskLayer *mask_layer, ListBase *elems, bool onlysel) |
| bool | ED_masklayer_frame_select_check (const MaskLayer *mask_layer) |
| void | ED_masklayer_frame_select_set (MaskLayer *mask_layer, short mode) |
| void | ED_masklayer_frames_select_box (MaskLayer *mask_layer, float min, float max, short select_mode) |
| void | ED_masklayer_frames_select_region (KeyframeEditData *ked, MaskLayer *mask_layer, short tool, short select_mode) |
| void | ED_mask_select_frames (MaskLayer *mask_layer, short select_mode) |
| void | ED_mask_select_frame (MaskLayer *mask_layer, int selx, short select_mode) |
| bool | ED_masklayer_frames_delete (MaskLayer *mask_layer) |
| bool | ED_masklayer_frames_duplicate (MaskLayer *mask_layer) |
| void | ED_masklayer_snap_frames (MaskLayer *mask_layer, Scene *scene, short mode) |
| void ED_keymap_mask | ( | wmKeyConfig * | keyconf | ) |
Definition at line 162 of file mask_edit.cc.
References ED_maskedit_poll(), wmKeyMap::poll, RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().
Referenced by ED_spacetypes_keymap().
| void ED_mask_center_from_pivot_ex | ( | const bContext * | C, |
| ScrArea * | area, | ||
| float | r_center[2], | ||
| char | mode, | ||
| bool * | r_has_select ) |
Definition at line 676 of file mask_query.cc.
References C, ED_mask_cursor_location_get(), ED_mask_selected_minmax(), max, mid_v2_v2v2(), min, and V3D_AROUND_CURSOR.
Referenced by blender::ed::transform::gizmo2d_calc_transform_pivot().
Definition at line 840 of file mask_query.cc.
References BLI_assert, copy_v2_v2(), SpaceClip::cursor, SpaceImage::cursor, ListBase::first, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, ScrArea::spacetype, and zero_v2().
Referenced by ED_mask_center_from_pivot_ex(), and primitive_add_invoke().
| void ED_mask_deselect_all | ( | const bContext * | C | ) |
Definition at line 181 of file mask_select.cc.
References C, CTX_data_edit_mask(), DEG_id_tag_update(), ED_mask_select_flush_all(), ED_mask_select_toggle_all(), ID_RECALC_SELECT, mask(), NC_MASK, ND_SELECT, SEL_DESELECT, and WM_event_add_notifier().
Referenced by select_exec().
Definition at line 791 of file mask_draw.cc.
References BKE_mask_layer_active(), BLI_listbase_count(), ED_region_visible_rect(), float, GPU_PRIM_LINES, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4ub(), immVertex2f(), immVertexFormat(), LISTBASE_FOREACH, mask(), pos, MaskLayer::splines_shapes, UI_SCALE_FAC, ARegion::winx, x, and rcti::ymin.
Referenced by draw_image_cache(), and draw_movieclip_cache().
| 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 ) |
Sets up the opengl context. width, height are to match the values from ED_mask_get_size().
Definition at line 641 of file mask_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), C, View2D::cur, DEG_get_evaluated(), 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_SHADER_2D_IMAGE_SHUFFLE_COLOR, GPU_shader_get_uniform(), GPU_shader_uniform_float_ex(), 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(), ARegion::v2d, ARegion::winrct, x, rctf::xmin, y, and rctf::ymin.
Referenced by clip_main_region_draw(), and image_main_region_draw().
Definition at line 766 of file mask_query.cc.
References BLI_assert, ED_space_clip_get_aspect(), ED_space_image_get_aspect(), ListBase::first, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, and ScrArea::spacetype.
Referenced by blender::ed::transform::createTransMaskingData(), and blender::ed::transform::flushTransMasking().
| void ED_mask_get_size | ( | ScrArea * | area, |
| int * | r_width, | ||
| int * | r_height ) |
Definition at line 701 of file mask_query.cc.
References BLI_assert, ED_space_clip_get_size(), ED_space_image_get_size(), ListBase::first, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, and ScrArea::spacetype.
Referenced by circle_select_exec(), clip_main_region_draw(), create_primitive_from_points(), ED_mask_feather_find_nearest(), ED_mask_find_nearest_diff_point(), ED_mask_point_find_nearest(), primitive_add_invoke(), slide_point_customdata(), and spline_under_mouse_get().
| void ED_mask_layer_shape_auto_key | ( | MaskLayer * | mask_layer, |
| int | frame ) |
Definition at line 376 of file mask_shapekey.cc.
References BKE_mask_layer_shape_from_mask(), and BKE_mask_layer_shape_verify_frame().
Referenced by ED_mask_layer_shape_auto_key_all(), ED_mask_layer_shape_auto_key_select(), mask_normals_make_consistent_exec(), mask_switch_direction_exec(), slide_point_modal(), and slide_spline_curvature_modal().
| bool ED_mask_layer_shape_auto_key_all | ( | Mask * | mask, |
| int | frame ) |
Definition at line 384 of file mask_shapekey.cc.
References ED_mask_layer_shape_auto_key(), LISTBASE_FOREACH, and mask().
| bool ED_mask_layer_shape_auto_key_select | ( | Mask * | mask, |
| int | frame ) |
Definition at line 396 of file mask_shapekey.cc.
References ED_mask_layer_select_check(), ED_mask_layer_shape_auto_key(), LISTBASE_FOREACH, and mask().
Referenced by blender::ed::transform::special_aftertrans_update__mask().
Takes event->mval.
Definition at line 487 of file mask_query.cc.
References BKE_mask_coord_from_image(), BKE_mask_coord_from_movieclip(), BLI_assert, SpaceClip::clip, ED_clip_mouse_pos(), ED_image_mouse_pos(), ListBase::first, SpaceImage::image, SpaceImage::iuser, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, ScrArea::spacetype, UI_view2d_region_to_view(), SpaceClip::user, ARegion::v2d, and zero_v2().
Referenced by add_feather_vertex_invoke(), add_vertex_invoke(), mask_select_linked_pick_invoke(), select_invoke(), slide_point_customdata(), slide_point_modal(), slide_spline_curvature_check(), slide_spline_curvature_customdata(), and slide_spline_curvature_modal().
| void ED_mask_pixelspace_factor | ( | ScrArea * | area, |
| ARegion * | region, | ||
| float * | r_scalex, | ||
| float * | r_scaley ) |
Definition at line 797 of file mask_query.cc.
References BLI_assert, ED_space_clip_get_aspect(), ED_space_image_get_aspect(), ListBase::first, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, ScrArea::spacetype, UI_view2d_scale_get(), and ARegion::v2d.
Referenced by ED_mask_feather_find_nearest(), ED_mask_find_nearest_diff_point(), ED_mask_point_find_nearest(), and mask_point_make_pixel_space().
| void ED_mask_point_pos | ( | ScrArea * | area, |
| ARegion * | region, | ||
| float | x, | ||
| float | y, | ||
| float * | r_x, | ||
| float * | r_y ) |
| x/y | input, mval space. |
| xr/yr | output, mask point space. |
Definition at line 520 of file mask_query.cc.
References BKE_mask_coord_from_image(), BKE_mask_coord_from_movieclip(), BLI_assert, SpaceClip::clip, ED_clip_point_stable_pos(), ED_image_point_pos(), ListBase::first, SpaceImage::image, SpaceImage::iuser, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, ScrArea::spacetype, SpaceClip::user, x, y, and zero_v2().
Referenced by box_select_exec(), and circle_select_exec().
| void ED_mask_point_pos__reverse | ( | ScrArea * | area, |
| ARegion * | region, | ||
| float | x, | ||
| float | y, | ||
| float * | r_x, | ||
| float * | r_y ) |
Definition at line 557 of file mask_query.cc.
References BKE_mask_coord_to_image(), BKE_mask_coord_to_movieclip(), BLI_assert, SpaceClip::clip, ED_clip_point_stable_pos__reverse(), ED_image_point_pos__reverse(), ListBase::first, SpaceImage::image, SpaceImage::iuser, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, ScrArea::spacetype, SpaceClip::user, x, y, and zero_v2().
Referenced by do_lasso_select_mask().
| void ED_mask_select_frame | ( | MaskLayer * | mask_layer, |
| int | selx, | ||
| short | select_mode ) |
Select the frame in this layer that occurs on this frame (there should only be one at most).
Definition at line 147 of file mask_editaction.cc.
References BKE_mask_layer_shape_find_frame(), and mask_layer_shape_select().
Referenced by actkeys_mselect_column(), actkeys_mselect_single(), and columnselect_action_keys().
| void ED_mask_select_frames | ( | MaskLayer * | mask_layer, |
| short | select_mode ) |
Set all/none/invert select (like above, but with SELECT_* modes).
Definition at line 123 of file mask_editaction.cc.
References LISTBASE_FOREACH, mask_layer_shape_select(), and MaskLayer::splines_shapes.
Referenced by actkeys_mselect_channel_only(), and ED_masklayer_frame_select_set().
| bool ED_mask_selected_minmax | ( | const bContext * | C, |
| float | min[2], | ||
| float | max[2], | ||
| bool | handles_as_control_point ) |
Definition at line 611 of file mask_query.cc.
References MaskSplinePoint::bezt, BKE_mask_point_handles_mode_get(), BKE_mask_spline_point_array(), C, CTX_data_depsgraph_pointer(), CTX_data_edit_mask(), DEG_get_evaluated(), depsgraph, BezTriple::f1, BezTriple::f2, BezTriple::f3, BezTriple::h1, BezTriple::h2, handle_position_for_minmax(), HD_VECT, i, INIT_MINMAX2, LISTBASE_FOREACH, mask(), MASK_HANDLE_MODE_STICK, MASK_HIDE_SELECT, MASK_HIDE_VIEW, MASK_WHICH_HANDLE_LEFT, MASK_WHICH_HANDLE_RIGHT, MASK_WHICH_HANDLE_STICK, Mask::masklayers, MASKPOINT_ISSEL_ANY, max, min, minmax_v2v2_v2(), SELECT, and BezTriple::vec.
Referenced by ED_mask_center_from_pivot_ex(), blender::ed::transform::gizmo2d_calc_bounds(), image_view_selected_exec(), and selected_boundbox().
Definition at line 735 of file mask_query.cc.
References BLI_assert, ED_space_clip_get_zoom(), ED_space_image_get_zoom(), ListBase::first, SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, ScrArea::spacedata, and ScrArea::spacetype.
Referenced by circle_select_exec().
| bool ED_maskedit_mask_poll | ( | bContext * | C | ) |
Returns true when the following conditions are met:
Definition at line 60 of file mask_edit.cc.
References C, CTX_wm_area(), ED_space_clip_maskedit_mask_poll(), ED_space_image_maskedit_mask_poll(), blender::ed::vse::maskedit_mask_poll(), SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, and ScrArea::spacetype.
Referenced by mask_layer_move_poll(), MASK_OT_add_feather_vertex(), MASK_OT_copy_splines(), MASK_OT_hide_view_clear(), MASK_OT_hide_view_set(), MASK_OT_layer_new(), and MASK_OT_layer_remove().
| bool ED_maskedit_mask_visible_splines_poll | ( | bContext * | C | ) |
Returns true when the following conditions are met:
Definition at line 76 of file mask_edit.cc.
References C, CTX_wm_area(), ED_space_clip_maskedit_mask_visible_splines_poll(), ED_space_image_maskedit_mask_visible_splines_poll(), blender::ed::vse::maskedit_mask_poll(), SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, and ScrArea::spacetype.
Referenced by blender::ed::transform::createTransMaskingData(), MASK_OT_cyclic_toggle(), MASK_OT_delete(), MASK_OT_duplicate(), MASK_OT_feather_weight_clear(), MASK_OT_handle_type_set(), MASK_OT_normals_make_consistent(), MASK_OT_parent_clear(), MASK_OT_select(), MASK_OT_select_all(), MASK_OT_select_box(), MASK_OT_select_circle(), MASK_OT_select_lasso(), MASK_OT_select_less(), MASK_OT_select_linked(), MASK_OT_select_linked_pick(), MASK_OT_select_more(), MASK_OT_shape_key_clear(), MASK_OT_shape_key_feather_reset(), MASK_OT_shape_key_insert(), MASK_OT_shape_key_rekey(), MASK_OT_slide_point(), MASK_OT_slide_spline_curvature(), MASK_OT_switch_direction(), and paste_splines_poll().
| bool ED_maskedit_poll | ( | bContext * | C | ) |
Returns true when the following conditions are met:
It is not required to have mask opened for editing.
Definition at line 28 of file mask_edit.cc.
References C, CTX_wm_area(), ED_space_clip_maskedit_poll(), ED_space_image_maskedit_poll(), blender::ed::vse::maskedit_poll(), SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, and ScrArea::spacetype.
Referenced by ED_keymap_mask(), image_view_selected_poll(), and MASK_OT_new().
| bool ED_maskedit_visible_splines_poll | ( | bContext * | C | ) |
Returns true when the following conditions are met:
It is not required to have mask opened for editing.
Definition at line 44 of file mask_edit.cc.
References C, CTX_wm_area(), ED_space_clip_maskedit_visible_splines_poll(), ED_space_image_maskedit_visible_splines_poll(), blender::ed::vse::maskedit_poll(), SPACE_CLIP, SPACE_IMAGE, SPACE_SEQ, and ScrArea::spacetype.
Referenced by MASK_OT_add_vertex(), MASK_OT_primitive_circle_add(), and MASK_OT_primitive_square_add().
| bool ED_masklayer_frame_select_check | ( | const MaskLayer * | mask_layer | ) |
Check if one of the frames in this layer is selected.
Definition at line 85 of file mask_editaction.cc.
References LISTBASE_FOREACH, MASK_SHAPE_SELECT, and MaskLayer::splines_shapes.
Referenced by deselect_action_keys().
| void ED_masklayer_frame_select_set | ( | MaskLayer * | mask_layer, |
| short | mode ) |
Set all/none/invert select.
Definition at line 136 of file mask_editaction.cc.
References ED_mask_select_frames().
Referenced by deselect_action_keys().
| bool ED_masklayer_frames_delete | ( | MaskLayer * | mask_layer | ) |
Delete selected frames.
Definition at line 212 of file mask_editaction.cc.
References BKE_mask_layer_shape_unlink(), LISTBASE_FOREACH_MUTABLE, MASK_SHAPE_SELECT, and MaskLayer::splines_shapes.
Referenced by delete_action_keys().
| bool ED_masklayer_frames_duplicate | ( | MaskLayer * | mask_layer | ) |
Duplicate selected frames from given mask-layer.
Definition at line 232 of file mask_editaction.cc.
References BKE_mask_layer_shape_duplicate(), BLI_insertlinkafter(), LISTBASE_FOREACH_MUTABLE, MASK_SHAPE_SELECT, and MaskLayer::splines_shapes.
Referenced by duplicate_action_keys().
| bool ED_masklayer_frames_looper | ( | MaskLayer * | mask_layer, |
| Scene * | scene, | ||
| bool(* | mask_layer_shape_cb )(MaskLayerShape *, Scene *) ) |
Loops over the mask-frames for a mask-layer, and applies the given callback.
Definition at line 37 of file mask_editaction.cc.
References LISTBASE_FOREACH, and MaskLayer::splines_shapes.
Referenced by ED_masklayer_snap_frames().
| void ED_masklayer_frames_select_box | ( | MaskLayer * | mask_layer, |
| float | min, | ||
| float | max, | ||
| short | select_mode ) |
Select the frames in this layer that occur within the bounds specified.
Definition at line 162 of file mask_editaction.cc.
References IN_RANGE, LISTBASE_FOREACH, mask_layer_shape_select(), max, min, and MaskLayer::splines_shapes.
Referenced by actkeys_select_leftright(), box_select_elem(), and markers_selectkeys_between().
| void ED_masklayer_frames_select_region | ( | KeyframeEditData * | ked, |
| MaskLayer * | mask_layer, | ||
| short | tool, | ||
| short | select_mode ) |
Select the frames in this layer that occur within the lasso/circle region specified.
Definition at line 176 of file mask_editaction.cc.
References BEZT_OK_CHANNEL_CIRCLE, BEZT_OK_CHANNEL_LASSO, KeyframeEditData::channel_y, KeyframeEditData::data, keyframe_region_circle_test(), keyframe_region_lasso_test(), LISTBASE_FOREACH, mask_layer_shape_select(), and MaskLayer::splines_shapes.
Referenced by region_select_elem().
Make a listing all the mask-frames in a layer as cfraelems.
Definition at line 61 of file mask_editaction.cc.
References BLI_addtail(), CfraElem::cfra, ELEM, float, LISTBASE_FOREACH, MASK_SHAPE_SELECT, MEM_callocN(), CfraElem::sel, and MaskLayer::splines_shapes.
Snap selected frames to ...
Definition at line 298 of file mask_editaction.cc.
References ED_masklayer_frames_looper(), SNAP_KEYS_CURFRAME, SNAP_KEYS_NEARFRAME, SNAP_KEYS_NEARMARKER, SNAP_KEYS_NEARSEC, snap_mask_layer_cframe(), snap_mask_layer_nearest(), snap_mask_layer_nearestsec(), and snap_mask_layer_nearmarker().
Referenced by snap_action_keys().
| void ED_operatormacros_mask | ( | ) |
Definition at line 168 of file mask_edit.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorTypeMacro::ptr, RNA_boolean_set(), WM_operatortype_append_macro(), and WM_operatortype_macro_define().
Referenced by ED_spacemacros_init().
| void ED_operatortypes_mask | ( | ) |
Definition at line 98 of file mask_edit.cc.
References MASK_OT_add_feather_vertex(), MASK_OT_add_vertex(), MASK_OT_copy_splines(), MASK_OT_cyclic_toggle(), MASK_OT_delete(), MASK_OT_duplicate(), MASK_OT_feather_weight_clear(), MASK_OT_handle_type_set(), MASK_OT_hide_view_clear(), MASK_OT_hide_view_set(), MASK_OT_layer_move(), MASK_OT_layer_new(), MASK_OT_layer_remove(), MASK_OT_new(), MASK_OT_normals_make_consistent(), MASK_OT_parent_clear(), MASK_OT_parent_set(), MASK_OT_paste_splines(), MASK_OT_primitive_circle_add(), MASK_OT_primitive_square_add(), MASK_OT_select(), MASK_OT_select_all(), MASK_OT_select_box(), MASK_OT_select_circle(), MASK_OT_select_lasso(), MASK_OT_select_less(), MASK_OT_select_linked(), MASK_OT_select_linked_pick(), MASK_OT_select_more(), MASK_OT_shape_key_clear(), MASK_OT_shape_key_feather_reset(), MASK_OT_shape_key_insert(), MASK_OT_shape_key_rekey(), MASK_OT_slide_point(), MASK_OT_slide_spline_curvature(), MASK_OT_switch_direction(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().