Blender V4.3
mask.cc File Reference
#include <cstddef>
#include <cstring>
#include <optional>
#include "CLG_log.h"
#include "MEM_guardedalloc.h"
#include "BLI_endian_switch.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "DNA_defaults.h"
#include "DNA_mask_types.h"
#include "BKE_animsys.h"
#include "BKE_curve.hh"
#include "BKE_idtype.hh"
#include "BKE_anim_data.hh"
#include "BKE_image.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_main.hh"
#include "BKE_mask.h"
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
#include "DEG_depsgraph_build.hh"
#include "DRW_engine.hh"
#include "BLO_read_write.hh"

Go to the source code of this file.

Functions

static void mask_copy_data (Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int)
 
static void mask_free_data (ID *id)
 
static void mask_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void mask_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void mask_blend_read_data (BlendDataReader *reader, ID *id)
 
static MaskSplinePointmask_spline_point_next (MaskSpline *spline, MaskSplinePoint *points_array, MaskSplinePoint *point)
 
static MaskSplinePointmask_spline_point_prev (MaskSpline *spline, MaskSplinePoint *points_array, MaskSplinePoint *point)
 
BezTripleBKE_mask_spline_point_next_bezt (MaskSpline *spline, MaskSplinePoint *points_array, MaskSplinePoint *point)
 
MaskSplinePointBKE_mask_spline_point_array (MaskSpline *spline)
 
MaskSplinePointBKE_mask_spline_point_array_from_point (MaskSpline *spline, const MaskSplinePoint *point_ref)
 
MaskLayerBKE_mask_layer_new (Mask *mask, const char *name)
 
MaskLayerBKE_mask_layer_active (Mask *mask)
 
void BKE_mask_layer_active_set (Mask *mask, MaskLayer *masklay)
 
void BKE_mask_layer_remove (Mask *mask, MaskLayer *masklay)
 
void BKE_mask_layer_unique_name (Mask *mask, MaskLayer *masklay)
 
void BKE_mask_layer_rename (Mask *mask, MaskLayer *masklay, const char *oldname, const char *newname)
 
MaskLayerBKE_mask_layer_copy (const MaskLayer *masklay)
 
void BKE_mask_layer_copy_list (ListBase *masklayers_new, const ListBase *masklayers)
 
MaskSplineBKE_mask_spline_add (MaskLayer *masklay)
 
bool BKE_mask_spline_remove (MaskLayer *mask_layer, MaskSpline *spline)
 
void BKE_mask_point_direction_switch (MaskSplinePoint *point)
 
void BKE_mask_spline_direction_switch (MaskLayer *masklay, MaskSpline *spline)
 
float BKE_mask_spline_project_co (MaskSpline *spline, MaskSplinePoint *point, float start_u, const float co[2], const eMaskSign sign)
 
eMaskhandleMode BKE_mask_point_handles_mode_get (const MaskSplinePoint *point)
 
void BKE_mask_point_handle (const MaskSplinePoint *point, eMaskWhichHandle which_handle, float r_handle[2])
 
void BKE_mask_point_set_handle (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 (MaskSpline *spline, MaskSplinePoint *point, float u, float co[2])
 
BLI_INLINE void orthogonal_direction_get (const float vec[2], float result[2])
 
void BKE_mask_point_normal (MaskSpline *spline, MaskSplinePoint *point, float u, float n[2])
 
static float mask_point_interp_weight (BezTriple *bezt, BezTriple *bezt_next, const float u)
 
float BKE_mask_point_weight_scalar (MaskSpline *spline, MaskSplinePoint *point, const float u)
 
float BKE_mask_point_weight (MaskSpline *spline, MaskSplinePoint *point, const float u)
 
MaskSplinePointUWBKE_mask_point_sort_uw (MaskSplinePoint *point, MaskSplinePointUW *uw)
 
void BKE_mask_point_add_uw (MaskSplinePoint *point, float u, float w)
 
void BKE_mask_point_select_set (MaskSplinePoint *point, const bool do_select)
 
void BKE_mask_point_select_set_handle (MaskSplinePoint *point, const eMaskWhichHandle which_handle, const bool do_select)
 
static Maskmask_alloc (Main *bmain, const char *name)
 
MaskBKE_mask_new (Main *bmain, const char *name)
 
void BKE_mask_point_free (MaskSplinePoint *point)
 
void BKE_mask_spline_free (MaskSpline *spline)
 
void BKE_mask_spline_free_list (ListBase *splines)
 
static MaskSplinePointmask_spline_points_copy (const MaskSplinePoint *points, int tot_point)
 
MaskSplineBKE_mask_spline_copy (const MaskSpline *spline)
 
MaskLayerShapeBKE_mask_layer_shape_alloc (MaskLayer *masklay, const int frame)
 
void BKE_mask_layer_shape_free (MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_free_shapes (MaskLayer *masklay)
 Free all animation keys for a mask layer.
 
void BKE_mask_layer_free (MaskLayer *masklay)
 
void BKE_mask_layer_free_list (ListBase *masklayers)
 
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 (MovieClip *clip, MovieClipUser *user, float r_co[2], const float co[2])
 
void BKE_mask_coord_from_image (Image *image, 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 (MovieClip *clip, MovieClipUser *user, float r_co[2], const float co[2])
 
void BKE_mask_coord_to_image (Image *image, ImageUser *iuser, float r_co[2], const float co[2])
 
void BKE_mask_point_parent_matrix_get (MaskSplinePoint *point, float ctime, float parent_matrix[3][3])
 
static void mask_calc_point_handle (MaskSplinePoint *point, MaskSplinePoint *point_prev, MaskSplinePoint *point_next)
 
void BKE_mask_get_handle_point_adjacent (MaskSpline *spline, MaskSplinePoint *point, MaskSplinePoint **r_point_prev, MaskSplinePoint **r_point_next)
 
void BKE_mask_calc_tangent_polyline (MaskSpline *spline, MaskSplinePoint *point, float t[2])
 
void BKE_mask_calc_handle_point (MaskSpline *spline, MaskSplinePoint *point)
 
void BKE_mask_calc_handle_adjacent_interp (MaskSpline *spline, MaskSplinePoint *point, const float u)
 
void BKE_mask_calc_handle_point_auto (MaskSpline *spline, MaskSplinePoint *point, const bool do_recalc_length)
 Resets auto handles even for non-auto bezier points.
 
void BKE_mask_layer_calc_handles (MaskLayer *masklay)
 
void BKE_mask_spline_ensure_deform (MaskSpline *spline)
 
void BKE_mask_layer_evaluate (MaskLayer *masklay, const float ctime, const bool do_newframe)
 
void BKE_mask_evaluate (Mask *mask, const float ctime, const bool do_newframe)
 
void BKE_mask_parent_init (MaskParent *parent)
 
int BKE_mask_layer_shape_totvert (MaskLayer *masklay)
 
static void mask_layer_shape_from_mask_point (BezTriple *bezt, float fp[MASK_OBJECT_SHAPE_ELEM_SIZE])
 
static void mask_layer_shape_to_mask_point (BezTriple *bezt, const float fp[MASK_OBJECT_SHAPE_ELEM_SIZE])
 
void BKE_mask_layer_shape_from_mask (MaskLayer *masklay, MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_shape_to_mask (MaskLayer *masklay, MaskLayerShape *masklay_shape)
 
BLI_INLINE void interp_v2_v2v2_flfl (float target[2], const float a[2], const float b[2], const float t, const float s)
 
void BKE_mask_layer_shape_to_mask_interp (MaskLayer *masklay, MaskLayerShape *masklay_shape_a, MaskLayerShape *masklay_shape_b, const float fac)
 
MaskLayerShapeBKE_mask_layer_shape_find_frame (MaskLayer *masklay, const int frame)
 
int BKE_mask_layer_shape_find_frame_range (MaskLayer *masklay, const float frame, MaskLayerShape **r_masklay_shape_a, MaskLayerShape **r_masklay_shape_b)
 
MaskLayerShapeBKE_mask_layer_shape_verify_frame (MaskLayer *masklay, const int frame)
 
MaskLayerShapeBKE_mask_layer_shape_duplicate (MaskLayerShape *masklay_shape)
 
void BKE_mask_layer_shape_unlink (MaskLayer *masklay, MaskLayerShape *masklay_shape)
 
static int mask_layer_shape_sort_cb (const void *masklay_shape_a_ptr, const void *masklay_shape_b_ptr)
 
void BKE_mask_layer_shape_sort (MaskLayer *masklay)
 
bool BKE_mask_layer_shape_spline_from_index (MaskLayer *masklay, int index, MaskSpline **r_masklay_shape, int *r_index)
 
int BKE_mask_layer_shape_spline_to_index (MaskLayer *masklay, MaskSpline *spline)
 
static void interp_weights_uv_v2_calc (float r_uv[2], const float pt[2], const float pt_a[2], const float pt_b[2])
 
static void interp_weights_uv_v2_apply (const float uv[2], float r_pt[2], const float pt_a[2], const float pt_b[2])
 
void BKE_mask_layer_shape_changed_add (MaskLayer *masklay, int index, bool do_init, bool do_init_interpolate)
 
void BKE_mask_layer_shape_changed_remove (MaskLayer *masklay, int index, int count)
 
int BKE_mask_get_duration (Mask *mask)
 
static void mask_clipboard_free_ex (bool final_free)
 
void BKE_mask_clipboard_free ()
 
void BKE_mask_clipboard_copy_from_layer (MaskLayer *mask_layer)
 
bool BKE_mask_clipboard_is_empty ()
 
void BKE_mask_clipboard_paste_to_layer (Main *bmain, MaskLayer *mask_layer)
 

Variables

static CLG_LogRef LOG = {"bke.mask"}
 
IDTypeInfo IDType_ID_MSK
 
struct { 
 
   ListBase   splines 
 
   GHash *   id_hash 
 
mask_clipboard = {{nullptr}} 
 

Function Documentation

◆ BKE_mask_calc_handle_adjacent_interp()

void BKE_mask_calc_handle_adjacent_interp ( MaskSpline * spline,
MaskSplinePoint * point,
const float u )

◆ BKE_mask_calc_handle_point()

void BKE_mask_calc_handle_point ( MaskSpline * spline,
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 1424 of file blenkernel/intern/mask.cc.

References MaskSplinePoint::bezt, BKE_mask_get_handle_point_adjacent(), dist_ensure_v2_v2fl(), BezTriple::h1, HD_AUTO, len_v3v3(), and mask_calc_point_handle().

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 1341 of file blenkernel/intern/mask.cc.

References add_v2_v2v2(), MaskSplinePoint::bezt, BKE_mask_get_handle_point_adjacent(), normalize_v2(), sub_v2_v2v2(), 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 1960 of file blenkernel/intern/mask.cc.

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 1997 of file blenkernel/intern/mask.cc.

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 ( Image * image,
ImageUser * iuser,
float r_co[2],
const float co[2] )

◆ BKE_mask_coord_from_movieclip()

◆ BKE_mask_coord_to_frame()

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

◆ BKE_mask_coord_to_image()

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

◆ BKE_mask_coord_to_movieclip()

◆ BKE_mask_evaluate()

void BKE_mask_evaluate ( Mask * mask,
const float ctime,
const bool do_newframe )

◆ BKE_mask_get_duration()

int BKE_mask_get_duration ( Mask * mask)

Definition at line 1939 of file blenkernel/intern/mask.cc.

References max_ii().

Referenced by SEQ_add_mask_strip(), and SEQ_add_reload_new_file().

◆ BKE_mask_get_handle_point_adjacent()

◆ BKE_mask_layer_active()

MaskLayer * BKE_mask_layer_active ( struct Mask * mask)

◆ BKE_mask_layer_active_set()

void BKE_mask_layer_active_set ( Mask * mask,
MaskLayer * masklay )

Definition at line 309 of file blenkernel/intern/mask.cc.

References BLI_findindex().

Referenced by mask_hide_view_set_exec().

◆ BKE_mask_layer_calc_handles()

void BKE_mask_layer_calc_handles ( MaskLayer * masklay)

◆ BKE_mask_layer_copy()

◆ BKE_mask_layer_copy_list()

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

Definition at line 396 of file blenkernel/intern/mask.cc.

References BKE_mask_layer_copy(), BLI_addtail(), and LISTBASE_FOREACH.

Referenced by mask_copy_data().

◆ BKE_mask_layer_evaluate()

void BKE_mask_layer_evaluate ( MaskLayer * masklay,
const float ctime,
const bool do_newframe )

◆ BKE_mask_layer_free()

void BKE_mask_layer_free ( MaskLayer * masklay)

◆ BKE_mask_layer_free_list()

void BKE_mask_layer_free_list ( ListBase * masklayers)

◆ BKE_mask_layer_free_shapes()

void BKE_mask_layer_free_shapes ( MaskLayer * masklay)

Free all animation keys for a mask layer.

Definition at line 1072 of file blenkernel/intern/mask.cc.

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

◆ BKE_mask_layer_remove()

void BKE_mask_layer_remove ( Mask * mask,
MaskLayer * masklay )

◆ BKE_mask_layer_rename()

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

◆ BKE_mask_layer_shape_alloc()

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

◆ BKE_mask_layer_shape_changed_add()

◆ BKE_mask_layer_shape_changed_remove()

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

Move array elements to account for removed point.

Definition at line 1902 of file blenkernel/intern/mask.cc.

References BKE_mask_layer_shape_totvert(), CLOG_ERROR, count, LISTBASE_FOREACH, LOG, MASK_OBJECT_SHAPE_ELEM_SIZE, MEM_freeN(), and MaskLayer::splines_shapes.

Referenced by delete_exec().

◆ BKE_mask_layer_shape_duplicate()

MaskLayerShape * BKE_mask_layer_shape_duplicate ( MaskLayerShape * masklay_shape)

Definition at line 1705 of file blenkernel/intern/mask.cc.

References MaskLayerShape::data, LIKELY, and MEM_dupallocN.

Referenced by ED_masklayer_frames_duplicate().

◆ BKE_mask_layer_shape_find_frame()

MaskLayerShape * BKE_mask_layer_shape_find_frame ( MaskLayer * masklay,
const 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 1650 of file blenkernel/intern/mask.cc.

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

Referenced by BKE_mask_layer_evaluate_animation().

◆ BKE_mask_layer_shape_free()

◆ BKE_mask_layer_shape_from_mask()

◆ BKE_mask_layer_shape_sort()

void BKE_mask_layer_shape_sort ( MaskLayer * masklay)

◆ BKE_mask_layer_shape_spline_from_index()

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

◆ BKE_mask_layer_shape_spline_to_index()

◆ BKE_mask_layer_shape_to_mask()

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

◆ BKE_mask_layer_shape_unlink()

void BKE_mask_layer_shape_unlink ( MaskLayer * masklay,
MaskLayerShape * masklay_shape )

◆ BKE_mask_layer_shape_verify_frame()

◆ BKE_mask_layer_unique_name()

void BKE_mask_layer_unique_name ( Mask * mask,
MaskLayer * masklay )

◆ BKE_mask_new()

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

Definition at line 957 of file blenkernel/intern/mask.cc.

References DATA_, DEG_relations_tag_update(), mask(), mask_alloc(), MAX_ID_NAME, and STRNCPY.

Referenced by ED_mask_new().

◆ BKE_mask_parent_init()

void BKE_mask_parent_init ( MaskParent * parent)

◆ BKE_mask_point_add_uw()

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

◆ BKE_mask_point_direction_switch()

void BKE_mask_point_direction_switch ( MaskSplinePoint * point)

Definition at line 441 of file blenkernel/intern/mask.cc.

References copy_v2_v2(), and MaskSplinePointUW::u.

Referenced by BKE_mask_spline_direction_switch().

◆ BKE_mask_point_free()

void BKE_mask_point_free ( MaskSplinePoint * point)

◆ BKE_mask_point_handle()

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

◆ BKE_mask_point_handles_mode_get()

eMaskhandleMode BKE_mask_point_handles_mode_get ( const MaskSplinePoint * point)

◆ BKE_mask_point_normal()

◆ BKE_mask_point_parent_matrix_get()

◆ BKE_mask_point_segment_co()

◆ BKE_mask_point_select_set()

◆ BKE_mask_point_select_set_handle()

void BKE_mask_point_select_set_handle ( MaskSplinePoint * point,
const eMaskWhichHandle which_handle,
const bool do_select )

◆ BKE_mask_point_set_handle()

void BKE_mask_point_set_handle ( 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()

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

Definition at line 848 of file blenkernel/intern/mask.cc.

References MaskSplinePointUW::u.

Referenced by BKE_mask_point_add_uw(), and slide_point_modal().

◆ BKE_mask_point_weight()

◆ BKE_mask_point_weight_scalar()

◆ BKE_mask_spline_add()

◆ BKE_mask_spline_copy()

◆ BKE_mask_spline_direction_switch()

void BKE_mask_spline_direction_switch ( MaskLayer * masklay,
MaskSpline * spline )

◆ BKE_mask_spline_ensure_deform()

void BKE_mask_spline_ensure_deform ( MaskSpline * spline)

◆ BKE_mask_spline_free()

◆ BKE_mask_spline_free_list()

void BKE_mask_spline_free_list ( ListBase * splines)

◆ BKE_mask_spline_point_array()

◆ BKE_mask_spline_point_array_from_point()

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

◆ BKE_mask_spline_point_next_bezt()

◆ BKE_mask_spline_project_co()

◆ BKE_mask_spline_remove()

bool BKE_mask_spline_remove ( MaskLayer * mask_layer,
MaskSpline * spline )

◆ interp_v2_v2v2_flfl()

BLI_INLINE void interp_v2_v2v2_flfl ( float target[2],
const float a[2],
const float b[2],
const float t,
const float s )

Definition at line 1587 of file blenkernel/intern/mask.cc.

References b.

Referenced by BKE_mask_layer_shape_to_mask_interp().

◆ interp_weights_uv_v2_apply()

static void interp_weights_uv_v2_apply ( const float uv[2],
float r_pt[2],
const float pt_a[2],
const float pt_b[2] )
static

Definition at line 1796 of file blenkernel/intern/mask.cc.

References madd_v2_v2v2fl().

Referenced by BKE_mask_layer_shape_changed_add().

◆ interp_weights_uv_v2_calc()

static void interp_weights_uv_v2_calc ( float r_uv[2],
const float pt[2],
const float pt_a[2],
const float pt_b[2] )
static

◆ mask_alloc()

static Mask * mask_alloc ( Main * bmain,
const char * name )
static

Definition at line 948 of file blenkernel/intern/mask.cc.

References BKE_libblock_alloc(), id_fake_user_set(), ID_MSK, and mask().

Referenced by BKE_mask_new().

◆ mask_blend_read_data()

static void mask_blend_read_data ( BlendDataReader * reader,
ID * id )
static

◆ mask_blend_write()

static void mask_blend_write ( BlendWriter * writer,
ID * id,
const void * id_address )
static

◆ mask_calc_point_handle()

◆ mask_clipboard_free_ex()

static void mask_clipboard_free_ex ( bool final_free)
static

◆ mask_copy_data()

static void mask_copy_data ( Main * ,
std::optional< Library * > ,
ID * id_dst,
const ID * id_src,
const int  )
static

◆ mask_foreach_id()

static void mask_foreach_id ( ID * id,
LibraryForeachIDData * data )
static

◆ mask_free_data()

static void mask_free_data ( ID * id)
static

Definition at line 73 of file blenkernel/intern/mask.cc.

References BKE_mask_layer_free_list(), and DRW_drawdata_free().

◆ mask_layer_shape_from_mask_point()

static void mask_layer_shape_from_mask_point ( BezTriple * bezt,
float fp[MASK_OBJECT_SHAPE_ELEM_SIZE] )
static

◆ mask_layer_shape_sort_cb()

static int mask_layer_shape_sort_cb ( const void * masklay_shape_a_ptr,
const void * masklay_shape_b_ptr )
static

Definition at line 1723 of file blenkernel/intern/mask.cc.

References MaskLayerShape::frame.

Referenced by BKE_mask_layer_shape_sort().

◆ mask_layer_shape_to_mask_point()

static void mask_layer_shape_to_mask_point ( BezTriple * bezt,
const float fp[MASK_OBJECT_SHAPE_ELEM_SIZE] )
static

◆ mask_point_interp_weight()

static float mask_point_interp_weight ( BezTriple * bezt,
BezTriple * bezt_next,
const float u )
static

Definition at line 768 of file blenkernel/intern/mask.cc.

References BezTriple::weight.

Referenced by BKE_mask_point_weight(), and BKE_mask_point_weight_scalar().

◆ mask_spline_point_next()

static MaskSplinePoint * mask_spline_point_next ( MaskSpline * spline,
MaskSplinePoint * points_array,
MaskSplinePoint * point )
static

Definition at line 216 of file blenkernel/intern/mask.cc.

References MASK_SPLINE_CYCLIC.

Referenced by BKE_mask_get_handle_point_adjacent().

◆ mask_spline_point_prev()

static MaskSplinePoint * mask_spline_point_prev ( MaskSpline * spline,
MaskSplinePoint * points_array,
MaskSplinePoint * point )
static

Definition at line 231 of file blenkernel/intern/mask.cc.

References MASK_SPLINE_CYCLIC.

Referenced by BKE_mask_get_handle_point_adjacent().

◆ mask_spline_points_copy()

static MaskSplinePoint * mask_spline_points_copy ( const MaskSplinePoint * points,
int tot_point )
static

Definition at line 1019 of file blenkernel/intern/mask.cc.

References MEM_dupallocN, and MaskSplinePoint::uw.

Referenced by BKE_mask_spline_copy().

◆ orthogonal_direction_get()

BLI_INLINE void orthogonal_direction_get ( const float vec[2],
float result[2] )

Definition at line 705 of file blenkernel/intern/mask.cc.

References normalize_v2().

Referenced by BKE_mask_point_normal().

Variable Documentation

◆ id_hash

GHash* id_hash

Definition at line 213 of file blenkernel/intern/mask.cc.

◆ IDType_ID_MSK

IDTypeInfo IDType_ID_MSK
Initial value:
= {
sizeof(Mask),
"Mask",
N_("masks"),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition BKE_idtype.hh:39
#define BLT_I18NCONTEXT_ID_MASK
#define FILTER_ID_MC
Definition DNA_ID.h:1177
#define FILTER_ID_MSK
Definition DNA_ID.h:1179
@ INDEX_ID_MSK
Definition DNA_ID.h:1274
@ ID_MSK
struct Mask Mask
static void mask_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static void mask_foreach_id(ID *id, LibraryForeachIDData *data)
static void mask_blend_read_data(BlendDataReader *reader, ID *id)
static void mask_copy_data(Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int)
static void mask_free_data(ID *id)
#define N_(msgid)

Definition at line 181 of file blenkernel/intern/mask.cc.

◆ LOG

◆ [struct]

◆ splines

ListBase splines

Definition at line 212 of file blenkernel/intern/mask.cc.