Blender V4.3
ED_mask.hh File Reference
#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_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)
 
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)
 

Function Documentation

◆ ED_keymap_mask()

void ED_keymap_mask ( wmKeyConfig * keyconf)

◆ ED_mask_cursor_location_get()

void ED_mask_cursor_location_get ( ScrArea * area,
float cursor[2] )

◆ ED_mask_deselect_all()

◆ ED_mask_draw_frames()

◆ ED_mask_draw_region()

◆ ED_mask_get_aspect()

void ED_mask_get_aspect ( ScrArea * area,
ARegion * region,
float * r_aspx,
float * r_aspy )

◆ ED_mask_get_size()

◆ ED_mask_layer_shape_auto_key()

◆ ED_mask_layer_shape_auto_key_all()

bool ED_mask_layer_shape_auto_key_all ( Mask * mask,
int frame )

Definition at line 386 of file mask_shapekey.cc.

References ED_mask_layer_shape_auto_key(), and LISTBASE_FOREACH.

◆ ED_mask_layer_shape_auto_key_select()

bool ED_mask_layer_shape_auto_key_select ( Mask * mask,
int frame )

◆ ED_mask_mouse_pos()

◆ ED_mask_pixelspace_factor()

◆ ED_mask_point_pos()

void ED_mask_point_pos ( ScrArea * area,
ARegion * region,
float x,
float y,
float * r_x,
float * r_y )

◆ ED_mask_point_pos__reverse()

◆ ED_mask_select_frame()

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 148 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().

◆ ED_mask_select_frames()

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 124 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().

◆ ED_mask_selected_minmax()

◆ ED_mask_zoom()

void ED_mask_zoom ( ScrArea * area,
ARegion * region,
float * r_zoomx,
float * r_zoomy )

◆ ED_maskedit_mask_poll()

bool ED_maskedit_mask_poll ( bContext * C)

Returns true when the following conditions are met:

  • Current space supports mask editing.
  • The space is configured to interact with mask.
  • The space has mask open for editing.

Definition at line 62 of file mask_edit.cc.

References CTX_wm_area(), ED_space_clip_maskedit_mask_poll(), ED_space_image_maskedit_mask_poll(), ED_space_sequencer_maskedit_mask_poll(), SPACE_CLIP, SPACE_IMAGE, and SPACE_SEQ.

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().

◆ ED_maskedit_mask_visible_splines_poll()

◆ ED_maskedit_poll()

bool ED_maskedit_poll ( bContext * C)

Returns true when the following conditions are met:

  • Current space supports mask editing.
  • The space is configured to interact with mask.

It is not required to have mask opened for editing.

Definition at line 30 of file mask_edit.cc.

References CTX_wm_area(), ED_space_clip_maskedit_poll(), ED_space_image_maskedit_poll(), ED_space_sequencer_maskedit_poll(), SPACE_CLIP, SPACE_IMAGE, and SPACE_SEQ.

Referenced by ED_keymap_mask(), image_view_selected_poll(), and MASK_OT_new().

◆ ED_maskedit_visible_splines_poll()

bool ED_maskedit_visible_splines_poll ( bContext * C)

Returns true when the following conditions are met:

  • Current space supports mask editing.
  • The space is configured to interact with mask.
  • Mask has visible and editable splines.

It is not required to have mask opened for editing.

Definition at line 46 of file mask_edit.cc.

References CTX_wm_area(), ED_space_clip_maskedit_visible_splines_poll(), ED_space_image_maskedit_visible_splines_poll(), ED_space_sequencer_maskedit_poll(), SPACE_CLIP, SPACE_IMAGE, and SPACE_SEQ.

Referenced by MASK_OT_add_vertex(), MASK_OT_primitive_circle_add(), and MASK_OT_primitive_square_add().

◆ ED_masklayer_frame_select_check()

bool ED_masklayer_frame_select_check ( const MaskLayer * mask_layer)

Check if one of the frames in this layer is selected.

Definition at line 86 of file mask_editaction.cc.

References LISTBASE_FOREACH, MASK_SHAPE_SELECT, and MaskLayer::splines_shapes.

Referenced by deselect_action_keys().

◆ ED_masklayer_frame_select_set()

void ED_masklayer_frame_select_set ( MaskLayer * mask_layer,
short mode )

Set all/none/invert select.

Definition at line 137 of file mask_editaction.cc.

References ED_mask_select_frames().

Referenced by deselect_action_keys().

◆ ED_masklayer_frames_delete()

bool ED_masklayer_frames_delete ( MaskLayer * mask_layer)

Delete selected frames.

Definition at line 213 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().

◆ ED_masklayer_frames_duplicate()

bool ED_masklayer_frames_duplicate ( MaskLayer * mask_layer)

Duplicate selected frames from given mask-layer.

Definition at line 233 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().

◆ ED_masklayer_frames_looper()

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 38 of file mask_editaction.cc.

References LISTBASE_FOREACH, and MaskLayer::splines_shapes.

Referenced by ED_masklayer_snap_frames().

◆ ED_masklayer_frames_select_box()

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 163 of file mask_editaction.cc.

References IN_RANGE, LISTBASE_FOREACH, mask_layer_shape_select(), min, and MaskLayer::splines_shapes.

Referenced by actkeys_select_leftright(), box_select_elem(), and markers_selectkeys_between().

◆ ED_masklayer_frames_select_region()

void ED_masklayer_frames_select_region ( KeyframeEditData * ked,
MaskLayer * mask_layer,
short tool,
short select_mode )

◆ ED_masklayer_make_cfra_list()

void ED_masklayer_make_cfra_list ( MaskLayer * mask_layer,
ListBase * elems,
bool onlysel )

Make a listing all the mask-frames in a layer as cfraelems.

Definition at line 62 of file mask_editaction.cc.

References BLI_addtail(), CfraElem::cfra, ELEM, float, LISTBASE_FOREACH, MASK_SHAPE_SELECT, CfraElem::sel, and MaskLayer::splines_shapes.

◆ ED_masklayer_snap_frames()

void ED_masklayer_snap_frames ( MaskLayer * mask_layer,
Scene * scene,
short mode )

◆ ED_operatormacros_mask()

◆ ED_operatortypes_mask()