Blender V4.3
mask_add.cc File Reference
#include <algorithm>
#include "MEM_guardedalloc.h"
#include "BKE_context.hh"
#include "BKE_curve.hh"
#include "BKE_mask.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "DEG_depsgraph.hh"
#include "DNA_mask_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_mask.hh"
#include "ED_select_utils.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "mask_intern.hh"

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

◆ add_feather_vertex_invoke()

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

◆ add_vertex_exec()

◆ add_vertex_extrude()

◆ add_vertex_handle_cyclic()

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

Definition at line 494 of file mask_add.cc.

References add_vertex_handle_cyclic_at_point(), and OPERATOR_PASS_THROUGH.

Referenced by add_vertex_exec().

◆ add_vertex_handle_cyclic_at_point()

◆ add_vertex_invoke()

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

◆ add_vertex_new()

◆ add_vertex_subdivide()

◆ create_primitive_from_points()

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

◆ MASK_OT_add_vertex()

◆ MASK_OT_primitive_circle_add()

◆ MASK_OT_primitive_square_add()

◆ 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

Definition at line 225 of file mask_add.cc.

References MEM_freeN().

Referenced by add_vertex_extrude(), and add_vertex_subdivide().

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

◆ primitive_circle_add_exec()

static int primitive_circle_add_exec ( bContext * C,
wmOperator * op )
static

◆ primitive_square_add_exec()

static int primitive_square_add_exec ( bContext * C,
wmOperator * op )
static

◆ setup_vertex_point()