Blender V4.3
mask_editaction.cc File Reference
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "DNA_mask_types.h"
#include "DNA_scene_types.h"
#include "BKE_mask.h"
#include "ED_anim_api.hh"
#include "ED_keyframes_edit.hh"
#include "ED_markers.hh"
#include "ED_mask.hh"

Go to the source code of this file.

Functions

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)
 
static void mask_layer_shape_select (MaskLayerShape *mask_layer_shape, short select_mode)
 
void ED_mask_select_frames (MaskLayer *mask_layer, short select_mode)
 
void ED_masklayer_frame_select_set (MaskLayer *mask_layer, short mode)
 
void ED_mask_select_frame (MaskLayer *mask_layer, int selx, short select_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)
 
bool ED_masklayer_frames_delete (MaskLayer *mask_layer)
 
bool ED_masklayer_frames_duplicate (MaskLayer *mask_layer)
 
static bool snap_mask_layer_nearest (MaskLayerShape *mask_layer_shape, Scene *)
 
static bool snap_mask_layer_nearestsec (MaskLayerShape *mask_layer_shape, Scene *scene)
 
static bool snap_mask_layer_cframe (MaskLayerShape *mask_layer_shape, Scene *scene)
 
static bool snap_mask_layer_nearmarker (MaskLayerShape *mask_layer_shape, Scene *scene)
 
void ED_masklayer_snap_frames (MaskLayer *mask_layer, Scene *scene, short mode)
 

Function Documentation

◆ 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_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 )

◆ mask_layer_shape_select()

static void mask_layer_shape_select ( MaskLayerShape * mask_layer_shape,
short select_mode )
static

◆ snap_mask_layer_cframe()

static bool snap_mask_layer_cframe ( MaskLayerShape * mask_layer_shape,
Scene * scene )
static

◆ snap_mask_layer_nearest()

static bool snap_mask_layer_nearest ( MaskLayerShape * mask_layer_shape,
Scene *  )
static

◆ snap_mask_layer_nearestsec()

static bool snap_mask_layer_nearestsec ( MaskLayerShape * mask_layer_shape,
Scene * scene )
static

◆ snap_mask_layer_nearmarker()

static bool snap_mask_layer_nearmarker ( MaskLayerShape * mask_layer_shape,
Scene * scene )
static