Blender  V3.3
Enumerations
BKE_mask.h File Reference

Go to the source code of this file.

Enumerations

enum  eMaskWhichHandle {
  MASK_WHICH_HANDLE_NONE = 0 , MASK_WHICH_HANDLE_STICK = 1 , MASK_WHICH_HANDLE_LEFT = 2 , MASK_WHICH_HANDLE_RIGHT = 3 ,
  MASK_WHICH_HANDLE_BOTH = 4
}
 
enum  eMaskhandleMode { MASK_HANDLE_MODE_STICK = 1 , MASK_HANDLE_MODE_INDIVIDUAL_HANDLES = 2 }
 

Functions

Mask Layers
struct MaskLayerBKE_mask_layer_new (struct Mask *mask, const char *name)
 
struct MaskLayerBKE_mask_layer_active (struct Mask *mask)
 
void BKE_mask_layer_active_set (struct Mask *mask, struct MaskLayer *masklay)
 
void BKE_mask_layer_remove (struct Mask *mask, struct MaskLayer *masklay)
 
void BKE_mask_layer_free_shapes (struct MaskLayer *masklay)
 Free all animation keys for a mask layer. More...
 
void BKE_mask_layer_free (struct MaskLayer *masklay)
 
void BKE_mask_layer_free_list (struct ListBase *masklayers)
 
void BKE_mask_spline_free (struct MaskSpline *spline)
 
void BKE_mask_spline_free_list (struct ListBase *splines)
 
struct MaskSplineBKE_mask_spline_copy (const struct MaskSpline *spline)
 
void BKE_mask_point_free (struct MaskSplinePoint *point)
 
void BKE_mask_layer_unique_name (struct Mask *mask, struct MaskLayer *masklay)
 
void BKE_mask_layer_rename (struct Mask *mask, struct MaskLayer *masklay, char *oldname, char *newname)
 
struct MaskLayerBKE_mask_layer_copy (const struct MaskLayer *masklay)
 
void BKE_mask_layer_copy_list (struct ListBase *masklayers_new, const struct ListBase *masklayers)
 
Point
eMaskhandleMode BKE_mask_point_handles_mode_get (const struct MaskSplinePoint *point)
 
void BKE_mask_point_handle (const struct MaskSplinePoint *point, eMaskWhichHandle which_handle, float r_handle[2])
 
void BKE_mask_point_set_handle (struct MaskSplinePoint *point, eMaskWhichHandle which_handle, float loc[2], bool keep_direction, float orig_handle[2], float orig_vec[3][3])
 
void BKE_mask_point_segment_co (struct MaskSpline *spline, struct MaskSplinePoint *point, float u, float co[2])
 
void BKE_mask_point_normal (struct MaskSpline *spline, struct MaskSplinePoint *point, float u, float n[2])
 
float BKE_mask_point_weight_scalar (struct MaskSpline *spline, struct MaskSplinePoint *point, float u)
 
float BKE_mask_point_weight (struct MaskSpline *spline, struct MaskSplinePoint *point, float u)
 
struct MaskSplinePointUWBKE_mask_point_sort_uw (struct MaskSplinePoint *point, struct MaskSplinePointUW *uw)
 
void BKE_mask_point_add_uw (struct MaskSplinePoint *point, float u, float w)
 
void BKE_mask_point_select_set (struct MaskSplinePoint *point, bool do_select)
 
void BKE_mask_point_select_set_handle (struct MaskSplinePoint *point, eMaskWhichHandle which_handle, bool do_select)
 
General
struct MaskBKE_mask_new (struct Main *bmain, const char *name)
 
void BKE_mask_coord_from_frame (float r_co[2], const float co[2], const float frame_size[2])
 
void BKE_mask_coord_from_movieclip (struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
 
void BKE_mask_coord_from_image (struct Image *image, struct ImageUser *iuser, float r_co[2], const float co[2])
 
void BKE_mask_coord_to_frame (float r_co[2], const float co[2], const float frame_size[2])
 
void BKE_mask_coord_to_movieclip (struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
 
void BKE_mask_coord_to_image (struct Image *image, struct ImageUser *iuser, float r_co[2], const float co[2])
 
Parenting
void BKE_mask_evaluate (struct Mask *mask, float ctime, bool do_newframe)
 
void BKE_mask_layer_evaluate (struct MaskLayer *masklay, float ctime, bool do_newframe)
 
void BKE_mask_parent_init (struct MaskParent *parent)
 
void BKE_mask_calc_handle_adjacent_interp (struct MaskSpline *spline, struct MaskSplinePoint *point, float u)
 
void BKE_mask_calc_tangent_polyline (struct MaskSpline *spline, struct MaskSplinePoint *point, float t[2])
 
void BKE_mask_calc_handle_point (struct MaskSpline *spline, struct MaskSplinePoint *point)
 
void BKE_mask_calc_handle_point_auto (struct MaskSpline *spline, struct MaskSplinePoint *point, bool do_recalc_length)
 Resets auto handles even for non-auto bezier points. More...
 
void BKE_mask_get_handle_point_adjacent (struct MaskSpline *spline, struct MaskSplinePoint *point, struct MaskSplinePoint **r_point_prev, struct MaskSplinePoint **r_point_next)
 
void BKE_mask_layer_calc_handles (struct MaskLayer *masklay)
 
void BKE_mask_spline_ensure_deform (struct MaskSpline *spline)
 
void BKE_mask_point_parent_matrix_get (struct MaskSplinePoint *point, float ctime, float parent_matrix[3][3])
 
Animation
int BKE_mask_layer_shape_totvert (struct MaskLayer *masklay)
 
void BKE_mask_layer_shape_from_mask (struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_shape_to_mask (struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_shape_to_mask_interp (struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape_a, struct MaskLayerShape *masklay_shape_b, float fac)
 
struct MaskLayerShapeBKE_mask_layer_shape_find_frame (struct MaskLayer *masklay, int frame)
 
int BKE_mask_layer_shape_find_frame_range (struct MaskLayer *masklay, float frame, struct MaskLayerShape **r_masklay_shape_a, struct MaskLayerShape **r_masklay_shape_b)
 
struct MaskLayerShapeBKE_mask_layer_shape_alloc (struct MaskLayer *masklay, int frame)
 
void BKE_mask_layer_shape_free (struct MaskLayerShape *masklay_shape)
 
struct MaskLayerShapeBKE_mask_layer_shape_verify_frame (struct MaskLayer *masklay, int frame)
 
struct MaskLayerShapeBKE_mask_layer_shape_duplicate (struct MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_shape_unlink (struct MaskLayer *masklay, struct MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_shape_sort (struct MaskLayer *masklay)
 
bool BKE_mask_layer_shape_spline_from_index (struct MaskLayer *masklay, int index, struct MaskSpline **r_masklay_shape, int *r_index)
 
int BKE_mask_layer_shape_spline_to_index (struct MaskLayer *masklay, struct MaskSpline *spline)
 
void BKE_mask_layer_shape_changed_add (struct MaskLayer *masklay, int index, bool do_init, bool do_init_interpolate)
 
void BKE_mask_layer_shape_changed_remove (struct MaskLayer *masklay, int index, int count)
 
int BKE_mask_get_duration (struct Mask *mask)
 

Clipboard

#define MASKPOINT_ISSEL_ANY(p)   ((((p)->bezt.f1 | (p)->bezt.f2 | (p)->bezt.f3) & SELECT) != 0)
 
#define MASKPOINT_ISSEL_KNOT(p)   (((p)->bezt.f2 & SELECT) != 0)
 
#define MASKPOINT_ISSEL_HANDLE(point, which_handle)
 
#define MASKPOINT_SEL_ALL(p)
 
#define MASKPOINT_DESEL_ALL(p)
 
#define MASKPOINT_INVSEL_ALL(p)
 
void BKE_mask_clipboard_free (void)
 
void BKE_mask_clipboard_copy_from_layer (struct MaskLayer *mask_layer)
 
bool BKE_mask_clipboard_is_empty (void)
 
void BKE_mask_clipboard_paste_to_layer (struct Main *bmain, struct MaskLayer *mask_layer)
 

Evaluation

#define MASK_RESOL_MAX   128
 
unsigned int BKE_mask_spline_resolution (struct MaskSpline *spline, int width, int height)
 
unsigned int BKE_mask_spline_feather_resolution (struct MaskSpline *spline, int width, int height)
 
int BKE_mask_spline_differentiate_calc_total (const struct MaskSpline *spline, unsigned int resol)
 
float(* BKE_mask_spline_differentiate_with_resolution (struct MaskSpline *spline, unsigned int resol, unsigned int *r_tot_diff_point))[2]
 
void BKE_mask_spline_feather_collapse_inner_loops (struct MaskSpline *spline, float(*feather_points)[2], unsigned int tot_feather_point)
 
float(* BKE_mask_spline_differentiate (struct MaskSpline *spline, int width, int height, unsigned int *r_tot_diff_point))[2]
 
float(* BKE_mask_spline_feather_differentiated_points_with_resolution (struct MaskSpline *spline, unsigned int resol, bool do_feather_isect, unsigned int *r_tot_feather_point))[2]
 
float(* BKE_mask_spline_feather_points (struct MaskSpline *spline, int *tot_feather_point))[2]
 
floatBKE_mask_point_segment_diff (struct MaskSpline *spline, struct MaskSplinePoint *point, int width, int height, unsigned int *r_tot_diff_point)
 
floatBKE_mask_point_segment_feather_diff (struct MaskSpline *spline, struct MaskSplinePoint *point, int width, int height, unsigned int *tot_feather_point)
 
void BKE_mask_layer_evaluate_animation (struct MaskLayer *masklay, float ctime)
 
void BKE_mask_layer_evaluate_deform (struct MaskLayer *masklay, float ctime)
 
void BKE_mask_eval_animation (struct Depsgraph *depsgraph, struct Mask *mask)
 
void BKE_mask_eval_update (struct Depsgraph *depsgraph, struct Mask *mask)
 

Splines

enum  eMaskSign { MASK_PROJ_NEG = -1 , MASK_PROJ_ANY = 0 , MASK_PROJ_POS = 1 }
 
struct MaskSplinePointBKE_mask_spline_point_array (struct MaskSpline *spline)
 
struct MaskSplinePointBKE_mask_spline_point_array_from_point (struct MaskSpline *spline, const struct MaskSplinePoint *point_ref)
 
struct MaskSplineBKE_mask_spline_add (struct MaskLayer *masklay)
 
bool BKE_mask_spline_remove (struct MaskLayer *mask_layer, struct MaskSpline *spline)
 
void BKE_mask_point_direction_switch (struct MaskSplinePoint *point)
 
void BKE_mask_spline_direction_switch (struct MaskLayer *masklay, struct MaskSpline *spline)
 
struct BezTripleBKE_mask_spline_point_next_bezt (struct MaskSpline *spline, struct MaskSplinePoint *points_array, struct MaskSplinePoint *point)
 
float BKE_mask_spline_project_co (struct MaskSpline *spline, struct MaskSplinePoint *point, float start_u, const float co[2], eMaskSign sign)
 

Rasterization

typedef struct MaskRasterHandle MaskRasterHandle
 
MaskRasterHandleBKE_maskrasterize_handle_new (void)
 
void BKE_maskrasterize_handle_free (MaskRasterHandle *mr_handle)
 
void BKE_maskrasterize_handle_init (MaskRasterHandle *mr_handle, struct Mask *mask, int width, int height, bool do_aspect_correct, bool do_mask_aa, bool do_feather)
 
float BKE_maskrasterize_handle_sample (MaskRasterHandle *mr_handle, const float xy[2])
 
void BKE_maskrasterize_buffer (MaskRasterHandle *mr_handle, unsigned int width, unsigned int height, float *buffer)
 Rasterize a buffer from a single mask (threaded execution). More...
 

Macro Definition Documentation

◆ MASK_RESOL_MAX

#define MASK_RESOL_MAX   128

Definition at line 333 of file BKE_mask.h.

◆ MASKPOINT_DESEL_ALL

#define MASKPOINT_DESEL_ALL (   p)
Value:
{ \
(p)->bezt.f1 &= ~SELECT; \
(p)->bezt.f2 &= ~SELECT; \
(p)->bezt.f3 &= ~SELECT; \
} \
(void)0
#define SELECT
SyclQueue void void size_t num_bytes void

Definition at line 312 of file BKE_mask.h.

◆ MASKPOINT_INVSEL_ALL

#define MASKPOINT_INVSEL_ALL (   p)
Value:
{ \
(p)->bezt.f1 ^= SELECT; \
(p)->bezt.f2 ^= SELECT; \
(p)->bezt.f3 ^= SELECT; \
} \
(void)0

Definition at line 319 of file BKE_mask.h.

◆ MASKPOINT_ISSEL_ANY

#define MASKPOINT_ISSEL_ANY (   p)    ((((p)->bezt.f1 | (p)->bezt.f2 | (p)->bezt.f3) & SELECT) != 0)

Definition at line 296 of file BKE_mask.h.

◆ MASKPOINT_ISSEL_HANDLE

#define MASKPOINT_ISSEL_HANDLE (   point,
  which_handle 
)
Value:
((((which_handle) == MASK_WHICH_HANDLE_STICK) ? \
((((point)->bezt.f1 | (point)->bezt.f3) & SELECT)) : \
(((which_handle) == MASK_WHICH_HANDLE_LEFT) ? ((point)->bezt.f1 & SELECT) : \
((point)->bezt.f3 & SELECT))) != 0)
@ MASK_WHICH_HANDLE_LEFT
Definition: BKE_mask.h:34
@ MASK_WHICH_HANDLE_STICK
Definition: BKE_mask.h:33
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point

Definition at line 299 of file BKE_mask.h.

◆ MASKPOINT_ISSEL_KNOT

#define MASKPOINT_ISSEL_KNOT (   p)    (((p)->bezt.f2 & SELECT) != 0)

Definition at line 297 of file BKE_mask.h.

◆ MASKPOINT_SEL_ALL

#define MASKPOINT_SEL_ALL (   p)
Value:
{ \
(p)->bezt.f1 |= SELECT; \
(p)->bezt.f2 |= SELECT; \
(p)->bezt.f3 |= SELECT; \
} \
(void)0

Definition at line 305 of file BKE_mask.h.

Typedef Documentation

◆ MaskRasterHandle

Definition at line 381 of file BKE_mask.h.

Enumeration Type Documentation

◆ eMaskhandleMode

Enumerator
MASK_HANDLE_MODE_STICK 
MASK_HANDLE_MODE_INDIVIDUAL_HANDLES 

Definition at line 39 of file BKE_mask.h.

◆ eMaskSign

enum eMaskSign
Enumerator
MASK_PROJ_NEG 
MASK_PROJ_ANY 
MASK_PROJ_POS 

Definition at line 94 of file BKE_mask.h.

◆ eMaskWhichHandle

Enumerator
MASK_WHICH_HANDLE_NONE 
MASK_WHICH_HANDLE_STICK 
MASK_WHICH_HANDLE_LEFT 
MASK_WHICH_HANDLE_RIGHT 
MASK_WHICH_HANDLE_BOTH 

Definition at line 31 of file BKE_mask.h.

Function Documentation

◆ BKE_mask_calc_handle_adjacent_interp()

void BKE_mask_calc_handle_adjacent_interp ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  u 
)

◆ BKE_mask_calc_handle_point()

void BKE_mask_calc_handle_point ( struct MaskSpline spline,
struct MaskSplinePoint point 
)

◆ BKE_mask_calc_handle_point_auto()

void BKE_mask_calc_handle_point_auto ( struct MaskSpline spline,
struct MaskSplinePoint point,
bool  do_recalc_length 
)

Resets auto handles even for non-auto bezier points.

Useful for giving sane defaults.

Definition at line 1495 of file mask.c.

References BKE_mask_get_handle_point_adjacent(), dist_ensure_v2_v2fl(), HD_AUTO, len_v3v3(), mask_calc_point_handle(), and point.

Referenced by add_vertex_handle_cyclic_at_point(), and mask_normals_make_consistent_exec().

◆ BKE_mask_calc_tangent_polyline()

void BKE_mask_calc_tangent_polyline ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  t[2] 
)

Calculates the tangent of a point by its previous and next (ignoring handles - as if its a poly line).

Definition at line 1412 of file mask.c.

References add_v2_v2v2(), MaskSplinePoint::bezt, BKE_mask_get_handle_point_adjacent(), normalize_v2(), point, sub_v2_v2v2(), t, BezTriple::vec, and zero_v2().

Referenced by add_vertex_extrude().

◆ BKE_mask_clipboard_copy_from_layer()

void BKE_mask_clipboard_copy_from_layer ( struct MaskLayer mask_layer)

◆ BKE_mask_clipboard_free()

void BKE_mask_clipboard_free ( void  )

Free the clipboard.

Definition at line 2049 of file mask.c.

References mask_clipboard_free_ex().

Referenced by WM_exit_ex().

◆ BKE_mask_clipboard_is_empty()

bool BKE_mask_clipboard_is_empty ( void  )

Check clipboard is empty.

Definition at line 2088 of file mask.c.

References BLI_listbase_is_empty(), and mask_clipboard.

Referenced by paste_splines_poll().

◆ BKE_mask_clipboard_paste_to_layer()

void BKE_mask_clipboard_paste_to_layer ( struct Main bmain,
struct MaskLayer mask_layer 
)

◆ BKE_mask_coord_from_frame()

void BKE_mask_coord_from_frame ( float  r_co[2],
const float  co[2],
const float  frame_size[2] 
)

◆ BKE_mask_coord_from_image()

void BKE_mask_coord_from_image ( struct Image image,
struct ImageUser iuser,
float  r_co[2],
const float  co[2] 
)

◆ BKE_mask_coord_from_movieclip()

void BKE_mask_coord_from_movieclip ( struct MovieClip clip,
struct MovieClipUser user,
float  r_co[2],
const float  co[2] 
)

◆ BKE_mask_coord_to_frame()

void BKE_mask_coord_to_frame ( float  r_co[2],
const float  co[2],
const float  frame_size[2] 
)

Inverse of BKE_mask_coord_from_image.

Definition at line 1230 of file mask.c.

Referenced by BKE_mask_coord_to_image(), and BKE_mask_coord_to_movieclip().

◆ BKE_mask_coord_to_image()

void BKE_mask_coord_to_image ( struct Image image,
struct ImageUser iuser,
float  r_co[2],
const float  co[2] 
)

◆ BKE_mask_coord_to_movieclip()

void BKE_mask_coord_to_movieclip ( struct MovieClip clip,
struct MovieClipUser user,
float  r_co[2],
const float  co[2] 
)

◆ BKE_mask_eval_animation()

void BKE_mask_eval_animation ( struct Depsgraph depsgraph,
struct Mask mask 
)

◆ BKE_mask_eval_update()

void BKE_mask_eval_update ( struct Depsgraph depsgraph,
struct Mask mask 
)

◆ BKE_mask_evaluate()

void BKE_mask_evaluate ( struct Mask mask,
float  ctime,
bool  do_newframe 
)

◆ BKE_mask_get_duration()

int BKE_mask_get_duration ( struct Mask mask)

Definition at line 2028 of file mask.c.

References mask(), and max_ii().

Referenced by SEQ_add_mask_strip(), and SEQ_add_reload_new_file().

◆ BKE_mask_get_handle_point_adjacent()

void BKE_mask_get_handle_point_adjacent ( struct MaskSpline spline,
struct MaskSplinePoint point,
struct MaskSplinePoint **  r_point_prev,
struct MaskSplinePoint **  r_point_next 
)

◆ BKE_mask_layer_active()

struct MaskLayer* BKE_mask_layer_active ( struct Mask mask)

◆ BKE_mask_layer_active_set()

void BKE_mask_layer_active_set ( struct Mask mask,
struct MaskLayer masklay 
)

Definition at line 366 of file mask.c.

References BLI_findindex(), and mask().

Referenced by mask_hide_view_set_exec().

◆ BKE_mask_layer_calc_handles()

void BKE_mask_layer_calc_handles ( struct MaskLayer masklay)

◆ BKE_mask_layer_copy()

struct MaskLayer* BKE_mask_layer_copy ( const struct MaskLayer masklay)

◆ BKE_mask_layer_copy_list()

void BKE_mask_layer_copy_list ( struct ListBase masklayers_new,
const struct ListBase masklayers 
)

◆ BKE_mask_layer_evaluate()

void BKE_mask_layer_evaluate ( struct MaskLayer masklay,
float  ctime,
bool  do_newframe 
)

◆ BKE_mask_layer_evaluate_animation()

void BKE_mask_layer_evaluate_animation ( struct MaskLayer masklay,
float  ctime 
)

◆ BKE_mask_layer_evaluate_deform()

void BKE_mask_layer_evaluate_deform ( struct MaskLayer masklay,
float  ctime 
)

◆ BKE_mask_layer_free()

void BKE_mask_layer_free ( struct MaskLayer masklay)

◆ BKE_mask_layer_free_list()

void BKE_mask_layer_free_list ( struct ListBase masklayers)

Definition at line 1170 of file mask.c.

References BKE_mask_layer_free(), BLI_remlink(), ListBase::first, and MaskLayer::next.

Referenced by mask_free_data().

◆ BKE_mask_layer_free_shapes()

void BKE_mask_layer_free_shapes ( struct MaskLayer masklay)

Free all animation keys for a mask layer.

Definition at line 1143 of file mask.c.

References BKE_mask_layer_shape_free(), BLI_remlink(), ListBase::first, MaskLayerShape::next, and MaskLayer::splines_shapes.

Referenced by BKE_mask_layer_free(), and delete_exec().

◆ BKE_mask_layer_new()

struct MaskLayer* BKE_mask_layer_new ( struct Mask mask,
const char *  name 
)

◆ BKE_mask_layer_remove()

void BKE_mask_layer_remove ( struct Mask mask,
struct MaskLayer masklay 
)

Definition at line 371 of file mask.c.

References BKE_mask_layer_free(), BLI_remlink(), and mask().

Referenced by animchannels_delete_exec(), and mask_layer_remove_exec().

◆ BKE_mask_layer_rename()

void BKE_mask_layer_rename ( struct Mask mask,
struct MaskLayer masklay,
char *  oldname,
char *  newname 
)

◆ BKE_mask_layer_shape_alloc()

struct MaskLayerShape* BKE_mask_layer_shape_alloc ( struct MaskLayer masklay,
int  frame 
)

◆ BKE_mask_layer_shape_changed_add()

void BKE_mask_layer_shape_changed_add ( struct MaskLayer masklay,
int  index,
bool  do_init,
bool  do_init_interpolate 
)

◆ BKE_mask_layer_shape_changed_remove()

void BKE_mask_layer_shape_changed_remove ( struct MaskLayer masklay,
int  index,
int  count 
)

◆ BKE_mask_layer_shape_duplicate()

struct MaskLayerShape* BKE_mask_layer_shape_duplicate ( struct MaskLayerShape masklay_shape)

Definition at line 1786 of file mask.c.

References MaskLayerShape::data, LIKELY, and MEM_dupallocN.

Referenced by ED_masklayer_frames_duplicate().

◆ BKE_mask_layer_shape_find_frame()

struct MaskLayerShape* BKE_mask_layer_shape_find_frame ( struct MaskLayer masklay,
int  frame 
)

◆ BKE_mask_layer_shape_find_frame_range()

int BKE_mask_layer_shape_find_frame_range ( struct MaskLayer masklay,
float  frame,
struct MaskLayerShape **  r_masklay_shape_a,
struct MaskLayerShape **  r_masklay_shape_b 
)

When returning 2 - the frame isn't found but before/after frames are.

Definition at line 1732 of file mask.c.

References ListBase::first, MaskLayerShape::frame, ListBase::last, MaskLayerShape::next, NULL, MaskLayerShape::prev, and MaskLayer::splines_shapes.

Referenced by BKE_mask_layer_evaluate_animation().

◆ BKE_mask_layer_shape_free()

void BKE_mask_layer_shape_free ( struct MaskLayerShape masklay_shape)

◆ BKE_mask_layer_shape_from_mask()

void BKE_mask_layer_shape_from_mask ( struct MaskLayer masklay,
struct MaskLayerShape masklay_shape 
)

◆ BKE_mask_layer_shape_sort()

void BKE_mask_layer_shape_sort ( struct MaskLayer masklay)

◆ BKE_mask_layer_shape_spline_from_index()

bool BKE_mask_layer_shape_spline_from_index ( struct MaskLayer masklay,
int  index,
struct MaskSpline **  r_masklay_shape,
int *  r_index 
)

◆ BKE_mask_layer_shape_spline_to_index()

int BKE_mask_layer_shape_spline_to_index ( struct MaskLayer masklay,
struct MaskSpline spline 
)

◆ BKE_mask_layer_shape_to_mask()

void BKE_mask_layer_shape_to_mask ( struct MaskLayer masklay,
struct MaskLayerShape masklay_shape 
)

◆ BKE_mask_layer_shape_to_mask_interp()

void BKE_mask_layer_shape_to_mask_interp ( struct MaskLayer masklay,
struct MaskLayerShape masklay_shape_a,
struct MaskLayerShape masklay_shape_b,
float  fac 
)

◆ BKE_mask_layer_shape_totvert()

int BKE_mask_layer_shape_totvert ( struct MaskLayer masklay)

◆ BKE_mask_layer_shape_unlink()

void BKE_mask_layer_shape_unlink ( struct MaskLayer masklay,
struct MaskLayerShape masklay_shape 
)

◆ BKE_mask_layer_shape_verify_frame()

struct MaskLayerShape* BKE_mask_layer_shape_verify_frame ( struct MaskLayer masklay,
int  frame 
)

◆ BKE_mask_layer_unique_name()

void BKE_mask_layer_unique_name ( struct Mask mask,
struct MaskLayer masklay 
)

Definition at line 383 of file mask.c.

References BLI_uniquename(), DATA_, mask(), and MaskLayer::name.

Referenced by BKE_mask_layer_new(), and BKE_mask_layer_rename().

◆ BKE_mask_new()

struct Mask* BKE_mask_new ( struct Main bmain,
const char *  name 
)

Definition at line 1022 of file mask.c.

References BLI_strncpy(), DEG_relations_tag_update(), mask(), mask_alloc(), and MAX_ID_NAME.

Referenced by ED_mask_new().

◆ BKE_mask_parent_init()

void BKE_mask_parent_init ( struct MaskParent parent)

◆ BKE_mask_point_add_uw()

void BKE_mask_point_add_uw ( struct MaskSplinePoint point,
float  u,
float  w 
)

Definition at line 937 of file mask.c.

References BKE_mask_point_sort_uw(), MEM_mallocN, MEM_reallocN, point, and w().

Referenced by add_feather_vertex_exec().

◆ BKE_mask_point_direction_switch()

void BKE_mask_point_direction_switch ( struct MaskSplinePoint point)

Definition at line 504 of file mask.c.

References copy_v2_v2(), point, SWAP, and MaskSplinePointUW::u.

Referenced by BKE_mask_spline_direction_switch().

◆ BKE_mask_point_free()

void BKE_mask_point_free ( struct MaskSplinePoint point)

◆ BKE_mask_point_handle()

void BKE_mask_point_handle ( const struct MaskSplinePoint point,
eMaskWhichHandle  which_handle,
float  r_handle[2] 
)

◆ BKE_mask_point_handles_mode_get()

eMaskhandleMode BKE_mask_point_handles_mode_get ( const struct MaskSplinePoint point)

◆ BKE_mask_point_normal()

void BKE_mask_point_normal ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  u,
float  n[2] 
)

◆ BKE_mask_point_parent_matrix_get()

void BKE_mask_point_parent_matrix_get ( struct MaskSplinePoint point,
float  ctime,
float  parent_matrix[3][3] 
)

◆ BKE_mask_point_segment_co()

void BKE_mask_point_segment_co ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  u,
float  co[2] 
)

◆ BKE_mask_point_segment_diff()

float* BKE_mask_point_segment_diff ( struct MaskSpline spline,
struct MaskSplinePoint point,
int  width,
int  height,
unsigned int *  r_tot_diff_point 
)

◆ BKE_mask_point_segment_feather_diff()

float* BKE_mask_point_segment_feather_diff ( struct MaskSpline spline,
struct MaskSplinePoint point,
int  width,
int  height,
unsigned int *  tot_feather_point 
)

◆ BKE_mask_point_select_set()

void BKE_mask_point_select_set ( struct MaskSplinePoint point,
bool  do_select 
)

◆ BKE_mask_point_select_set_handle()

void BKE_mask_point_select_set_handle ( struct MaskSplinePoint point,
eMaskWhichHandle  which_handle,
bool  do_select 
)

◆ BKE_mask_point_set_handle()

void BKE_mask_point_set_handle ( struct MaskSplinePoint point,
eMaskWhichHandle  which_handle,
float  loc[2],
bool  keep_direction,
float  orig_handle[2],
float  orig_vec[3][3] 
)

◆ BKE_mask_point_sort_uw()

struct MaskSplinePointUW* BKE_mask_point_sort_uw ( struct MaskSplinePoint point,
struct MaskSplinePointUW uw 
)

Definition at line 912 of file mask.c.

References point, SWAP, and MaskSplinePointUW::u.

Referenced by BKE_mask_point_add_uw(), and slide_point_modal().

◆ BKE_mask_point_weight()

float BKE_mask_point_weight ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  u 
)

◆ BKE_mask_point_weight_scalar()

float BKE_mask_point_weight_scalar ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  u 
)

◆ BKE_mask_spline_add()

struct MaskSpline* BKE_mask_spline_add ( struct MaskLayer masklay)

◆ BKE_mask_spline_copy()

struct MaskSpline* BKE_mask_spline_copy ( const struct MaskSpline spline)

Referenced by slide_point_modal().

◆ BKE_mask_spline_differentiate()

float(* BKE_mask_spline_differentiate ( struct MaskSpline spline,
int  width,
int  height,
unsigned int *  r_tot_diff_point 
) )[2]

◆ BKE_mask_spline_differentiate_calc_total()

int BKE_mask_spline_differentiate_calc_total ( const struct MaskSpline spline,
unsigned int  resol 
)

◆ BKE_mask_spline_differentiate_with_resolution()

float(* BKE_mask_spline_differentiate_with_resolution ( struct MaskSpline spline,
unsigned int  resol,
unsigned int *  r_tot_diff_point 
) )[2]

◆ BKE_mask_spline_direction_switch()

void BKE_mask_spline_direction_switch ( struct MaskLayer masklay,
struct MaskSpline spline 
)

◆ BKE_mask_spline_ensure_deform()

void BKE_mask_spline_ensure_deform ( struct MaskSpline spline)

◆ BKE_mask_spline_feather_collapse_inner_loops()

void BKE_mask_spline_feather_collapse_inner_loops ( struct MaskSpline spline,
float(*)  feather_points[2],
unsigned int  tot_feather_point 
)

◆ BKE_mask_spline_feather_differentiated_points_with_resolution()

float(* BKE_mask_spline_feather_differentiated_points_with_resolution ( struct MaskSpline spline,
unsigned int  resol,
bool  do_feather_isect,
unsigned int *  r_tot_feather_point 
) )[2]

◆ BKE_mask_spline_feather_points()

float(* BKE_mask_spline_feather_points ( struct MaskSpline spline,
int *  tot_feather_point 
) )[2]

◆ BKE_mask_spline_feather_resolution()

unsigned int BKE_mask_spline_feather_resolution ( struct MaskSpline spline,
int  width,
int  height 
)

◆ BKE_mask_spline_free()

void BKE_mask_spline_free ( struct MaskSpline spline)

◆ BKE_mask_spline_free_list()

void BKE_mask_spline_free_list ( struct ListBase splines)

◆ BKE_mask_spline_point_array()

struct MaskSplinePoint* BKE_mask_spline_point_array ( struct MaskSpline spline)

◆ BKE_mask_spline_point_array_from_point()

struct MaskSplinePoint* BKE_mask_spline_point_array_from_point ( struct MaskSpline spline,
const struct MaskSplinePoint point_ref 
)

◆ BKE_mask_spline_point_next_bezt()

struct BezTriple* BKE_mask_spline_point_next_bezt ( struct MaskSpline spline,
struct MaskSplinePoint points_array,
struct MaskSplinePoint point 
)

◆ BKE_mask_spline_project_co()

float BKE_mask_spline_project_co ( struct MaskSpline spline,
struct MaskSplinePoint point,
float  start_u,
const float  co[2],
eMaskSign  sign 
)

◆ BKE_mask_spline_remove()

bool BKE_mask_spline_remove ( struct MaskLayer mask_layer,
struct MaskSpline spline 
)

Definition at line 493 of file mask.c.

References BKE_mask_spline_free(), BLI_remlink_safe(), and MaskLayer::splines.

◆ BKE_mask_spline_resolution()

unsigned int BKE_mask_spline_resolution ( struct MaskSpline spline,
int  width,
int  height 
)

◆ BKE_maskrasterize_buffer()

void BKE_maskrasterize_buffer ( MaskRasterHandle mr_handle,
unsigned int  width,
unsigned int  height,
float buffer 
)

◆ BKE_maskrasterize_handle_free()

void BKE_maskrasterize_handle_free ( MaskRasterHandle mr_handle)

◆ BKE_maskrasterize_handle_init()

void BKE_maskrasterize_handle_init ( MaskRasterHandle mr_handle,
struct Mask mask,
int  width,
int  height,
bool  do_aspect_correct,
bool  do_mask_aa,
bool  do_feather 
)

Definition at line 564 of file mask_rasterize.c.

References add_v2_v2v2(), MaskRasterLayer::alpha, MaskLayer::alpha, angle(), BKE_mask_spline_differentiate_with_resolution(), BKE_mask_spline_feather_collapse_inner_loops(), BKE_mask_spline_feather_differentiated_points_with_resolution(), BKE_mask_spline_feather_resolution(), BKE_mask_spline_resolution(), MaskRasterLayer::blend, MaskLayer::blend, MaskRasterLayer::blend_flag, MaskLayer::blend_flag, BLI_assert, BLI_listbase_count(), BLI_memarena_free(), BLI_memarena_new(), BLI_movelisttolist(), BLI_rctf_do_minmax_v(), BLI_rctf_init_minmax(), BLI_rctf_isect(), BLI_rctf_union(), BLI_remlink(), BLI_SCANFILL_ARENA_SIZE, BLI_scanfill_begin_arena(), BLI_scanfill_calc_ex(), BLI_SCANFILL_CALC_HOLES, BLI_SCANFILL_CALC_POLYS, BLI_scanfill_calc_self_isect(), BLI_scanfill_edge_add(), BLI_scanfill_end_arena(), bounds(), MaskRasterLayer::bounds, MaskRasterHandle::bounds, ScanFillEdge::c, CALC_CAP_RESOL, CLAMPIS, ScanFillVert::co, copy_v3_v3(), KDL::cos(), MaskRasterLayer::face_array, FACE_ASSERT, MaskRasterLayer::face_coords, MaskRasterLayer::face_tot, MaskRasterLayer::falloff, MaskLayer::falloff, ScanFillContext::filledgebase, ScanFillContext::fillfacebase, ScanFillContext::fillvertbase, ListBase::first, MaskSpline::flag, MaskLayer::flag, float(), height, MaskRasterSplineInfo::is_cyclic, is_cyclic(), ScanFillVert::keyindex, ListBase::last, layer_bucket_init(), layer_bucket_init_dummy(), MaskRasterHandle::layers, MaskRasterHandle::layers_tot, M_PI, mask(), MASK_HIDE_RENDER, MASK_LAYERFLAG_FILL_DISCRETE, MASK_LAYERFLAG_FILL_OVERLAP, MASK_SPLINE_CYCLIC, MASK_SPLINE_NOFILL, MASK_SPLINE_NOINTERSECT, maskrasterize_spline_differentiate_point_outset(), MAX2, MEM_callocN, MEM_freeN, MEM_mallocN, MEM_reallocN, min_ii(), ScanFillVert::next, ScanFillEdge::next, ScanFillFace::next, MaskSpline::next, MaskLayer::next, NULL, ScanFillContext::poly_nr, rotate_point_v2(), scanfill_vert_add_v2_with_depth(), SF_EDGE_IS_BOUNDARY, SF_KEYINDEX_TEMP_ID, MaskLayer::splines, sub_v2_v2v2(), ScanFillVert::tmp, ScanFillEdge::tmp, TRI_VERT, ScanFillVert::u, ScanFillEdge::v1, ScanFillFace::v1, ScanFillEdge::v2, ScanFillFace::v2, ScanFillFace::v3, MaskRasterSplineInfo::vertex_offset, MaskRasterSplineInfo::vertex_total, MaskRasterSplineInfo::vertex_total_cap_head, MaskRasterSplineInfo::vertex_total_cap_tail, MaskLayer::visibility_flag, void, and width.

Referenced by edit_uv_mask_texture(), blender::compositor::MaskOperation::init_execution(), mask_rasterize(), and seq_render_mask().

◆ BKE_maskrasterize_handle_new()

MaskRasterHandle* BKE_maskrasterize_handle_new ( void  )

◆ BKE_maskrasterize_handle_sample()

float BKE_maskrasterize_handle_sample ( MaskRasterHandle mr_handle,
const float  xy[2] 
)