Blender  V3.3
mask_add.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_mask.h"
#include "DEG_depsgraph.h"
#include "DNA_mask_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_mask.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "mask_intern.h"

Go to the source code of this file.

Functions

Add Vertex
static void setup_vertex_point (Mask *mask, MaskSpline *spline, MaskSplinePoint *new_point, const float point_co[2], const float u, const float ctime, const MaskSplinePoint *reference_point, const bool reference_adjacent)
 
Add Extrude Vertex
static void finSelectedSplinePoint (MaskLayer *mask_layer, MaskSpline **spline, MaskSplinePoint **point, bool check_active)
 
Add Subdivide Vertex
static void mask_spline_add_point_at_index (MaskSpline *spline, int point_index)
 
static bool add_vertex_subdivide (const bContext *C, Mask *mask, const float co[2])
 
static bool add_vertex_extrude (const bContext *C, Mask *mask, MaskLayer *mask_layer, const float co[2])
 
static bool add_vertex_new (const bContext *C, Mask *mask, MaskLayer *mask_layer, const float co[2])
 
static void mask_point_make_pixel_space (bContext *C, const float point_normalized[2], float point_pixel[2])
 
static int add_vertex_handle_cyclic_at_point (bContext *C, Mask *mask, MaskSpline *spline, MaskSplinePoint *active_point, MaskSplinePoint *other_point, float co[2])
 
static int add_vertex_handle_cyclic (bContext *C, Mask *mask, MaskSpline *spline, MaskSplinePoint *active_point, float co[2])
 
Add Vertex Operator
static int add_vertex_exec (bContext *C, wmOperator *op)
 
static int add_vertex_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void MASK_OT_add_vertex (wmOperatorType *ot)
 
Add Feather Vertex Operator
static int add_feather_vertex_exec (bContext *C, wmOperator *op)
 
static int add_feather_vertex_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void MASK_OT_add_feather_vertex (wmOperatorType *ot)
 
Common Primitive Functions
static BezTriplepoints_to_bezier (const float(*points)[2], const int num_points, const char handle_type, const float scale, const float location[2])
 
static int create_primitive_from_points (bContext *C, wmOperator *op, const float(*points)[2], int num_points, char handle_type)
 
static int primitive_add_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 
static void define_primitive_add_properties (wmOperatorType *ot)
 
Primitive Add Circle Operator
static int primitive_circle_add_exec (bContext *C, wmOperator *op)
 
void MASK_OT_primitive_circle_add (wmOperatorType *ot)
 
Primitive Add Square Operator
static int primitive_square_add_exec (bContext *C, wmOperator *op)
 
void MASK_OT_primitive_square_add (wmOperatorType *ot)
 

Function Documentation

◆ add_feather_vertex_exec()

static int add_feather_vertex_exec ( bContext C,
wmOperator op 
)
static

◆ add_feather_vertex_invoke()

static int add_feather_vertex_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ add_vertex_exec()

static int add_vertex_exec ( bContext C,
wmOperator op 
)
static

◆ add_vertex_extrude()

static bool add_vertex_extrude ( const bContext C,
Mask mask,
MaskLayer mask_layer,
const float  co[2] 
)
static

◆ add_vertex_handle_cyclic()

static int add_vertex_handle_cyclic ( bContext C,
Mask mask,
MaskSpline spline,
MaskSplinePoint active_point,
float  co[2] 
)
static

◆ add_vertex_handle_cyclic_at_point()

static int add_vertex_handle_cyclic_at_point ( bContext C,
Mask mask,
MaskSpline spline,
MaskSplinePoint active_point,
MaskSplinePoint other_point,
float  co[2] 
)
static

◆ add_vertex_invoke()

static int add_vertex_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ add_vertex_new()

static bool add_vertex_new ( const bContext C,
Mask mask,
MaskLayer mask_layer,
const float  co[2] 
)
static

◆ add_vertex_subdivide()

static bool add_vertex_subdivide ( const bContext C,
Mask mask,
const float  co[2] 
)
static

◆ create_primitive_from_points()

static int create_primitive_from_points ( bContext C,
wmOperator op,
const float(*)  points[2],
int  num_points,
char  handle_type 
)
static

◆ define_primitive_add_properties()

static void define_primitive_add_properties ( wmOperatorType ot)
static

◆ finSelectedSplinePoint()

static void finSelectedSplinePoint ( MaskLayer mask_layer,
MaskSpline **  spline,
MaskSplinePoint **  point,
bool  check_active 
)
static

◆ MASK_OT_add_feather_vertex()

void MASK_OT_add_feather_vertex ( wmOperatorType ot)

◆ MASK_OT_add_vertex()

void MASK_OT_add_vertex ( wmOperatorType ot)

◆ MASK_OT_primitive_circle_add()

void MASK_OT_primitive_circle_add ( wmOperatorType ot)

◆ MASK_OT_primitive_square_add()

void MASK_OT_primitive_square_add ( wmOperatorType ot)

◆ mask_point_make_pixel_space()

static void mask_point_make_pixel_space ( bContext C,
const float  point_normalized[2],
float  point_pixel[2] 
)
static

◆ mask_spline_add_point_at_index()

static void mask_spline_add_point_at_index ( MaskSpline spline,
int  point_index 
)
static

◆ points_to_bezier()

static BezTriple* points_to_bezier ( const float(*)  points[2],
const int  num_points,
const char  handle_type,
const float  scale,
const float  location[2] 
)
static

◆ primitive_add_invoke()

static int primitive_add_invoke ( bContext C,
wmOperator op,
const wmEvent UNUSEDevent 
)
static

◆ primitive_circle_add_exec()

static int primitive_circle_add_exec ( bContext C,
wmOperator op 
)
static

Definition at line 845 of file mask_add.c.

References C, create_primitive_from_points(), HD_AUTO, and OPERATOR_FINISHED.

Referenced by MASK_OT_primitive_circle_add().

◆ primitive_square_add_exec()

static int primitive_square_add_exec ( bContext C,
wmOperator op 
)
static

Definition at line 880 of file mask_add.c.

References C, create_primitive_from_points(), HD_VECT, and OPERATOR_FINISHED.

Referenced by MASK_OT_primitive_square_add().

◆ setup_vertex_point()

static void setup_vertex_point ( Mask mask,
MaskSpline spline,
MaskSplinePoint new_point,
const float  point_co[2],
const float  u,
const float  ctime,
const MaskSplinePoint reference_point,
const bool  reference_adjacent 
)
static