|
Blender V5.0
|
#include <algorithm>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "DNA_mask_types.h"#include "BKE_curve.hh"#include "BKE_mask.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"Go to the source code of this file.
Classes | |
| struct | FeatherEdgesBucket |
Macros | |
| #define | BUCKET_INDEX(co) |
Functions | |
| int | BKE_mask_spline_resolution (MaskSpline *spline, int width, int height) |
| uint | BKE_mask_spline_feather_resolution (MaskSpline *spline, int width, int height) |
| int | BKE_mask_spline_differentiate_calc_total (const MaskSpline *spline, const uint resol) |
| float(* | BKE_mask_spline_differentiate_with_resolution (MaskSpline *spline, const uint resol, uint *r_tot_diff_point))[2] |
| float(* | BKE_mask_spline_differentiate (MaskSpline *spline, int width, int height, uint *r_tot_diff_point))[2] |
| static void | feather_bucket_add_edge (FeatherEdgesBucket *bucket, int start, int end) |
| static void | feather_bucket_check_intersect (float(*feather_points)[2], int tot_feather_point, FeatherEdgesBucket *bucket, int cur_a, int cur_b) |
| static int | feather_bucket_index_from_coord (const float co[2], const float min[2], const float bucket_scale[2], const int buckets_per_side) |
| static void | feather_bucket_get_diagonal (FeatherEdgesBucket *buckets, int start_bucket_index, int end_bucket_index, int buckets_per_side, FeatherEdgesBucket **r_diagonal_bucket_a, FeatherEdgesBucket **r_diagonal_bucket_b) |
| void | BKE_mask_spline_feather_collapse_inner_loops (MaskSpline *spline, float(*feather_points)[2], const uint tot_feather_point) |
| static float(* | mask_spline_feather_differentiated_points_with_resolution__even (MaskSpline *spline, const uint resol, const bool do_feather_isect, uint *r_tot_feather_point))[2] |
| static float(* | mask_spline_feather_differentiated_points_with_resolution__double (MaskSpline *spline, const uint resol, const bool do_feather_isect, uint *r_tot_feather_point))[2] |
| float(* | BKE_mask_spline_feather_differentiated_points_with_resolution (MaskSpline *spline, const uint resol, const bool do_feather_isect, uint *r_tot_feather_point))[2] |
| float(* | BKE_mask_spline_feather_points (MaskSpline *spline, int *r_tot_feather_point))[2] |
| float * | BKE_mask_point_segment_feather_diff (MaskSpline *spline, MaskSplinePoint *point, int width, int height, uint *r_tot_feather_point) |
| float * | BKE_mask_point_segment_diff (MaskSpline *spline, MaskSplinePoint *point, int width, int height, uint *r_tot_diff_point) |
| static void | mask_evaluate_apply_point_parent (MaskSplinePoint *point, float ctime) |
| void | BKE_mask_layer_evaluate_animation (MaskLayer *masklay, const float ctime) |
| void | BKE_mask_layer_evaluate_deform (MaskLayer *masklay, const float ctime) |
| void | BKE_mask_eval_animation (Depsgraph *depsgraph, Mask *mask) |
| void | BKE_mask_eval_update (Depsgraph *depsgraph, Mask *mask) |
Functions for evaluating the mask beziers into points for the outline and feather.
Definition in file mask_evaluate.cc.
| #define BUCKET_INDEX | ( | co | ) |
Referenced by BKE_mask_spline_feather_collapse_inner_loops().
| void BKE_mask_eval_animation | ( | Depsgraph * | depsgraph, |
| Mask * | mask ) |
Definition at line 909 of file mask_evaluate.cc.
References BKE_mask_layer_evaluate_animation(), DEG_debug_print_eval(), DEG_get_ctime(), DEG_get_update_count(), depsgraph, LISTBASE_FOREACH, and mask().
Referenced by blender::deg::DepsgraphNodeBuilder::build_mask().
| void BKE_mask_eval_update | ( | Depsgraph * | depsgraph, |
| Mask * | mask ) |
Definition at line 919 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_mask_layer_evaluate_deform(), DEG_debug_print_eval(), DEG_get_ctime(), DEG_get_original(), DEG_get_update_count(), DEG_is_active(), depsgraph, ListBase::first, i, LISTBASE_FOREACH, mask(), Mask::masklayers, MaskLayer::next, and MaskSpline::next.
Referenced by blender::deg::DepsgraphNodeBuilder::build_mask().
Definition at line 838 of file mask_evaluate.cc.
References BKE_mask_layer_shape_find_frame_range(), BKE_mask_layer_shape_to_mask(), BKE_mask_layer_shape_to_mask_interp(), BLI_assert, BLI_listbase_count(), MaskLayerShape::frame, printf, MaskLayer::splines_shapes, and w().
Referenced by BKE_mask_eval_animation(), and BKE_mask_layer_evaluate().
Definition at line 876 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_mask_calc_handle_point(), BKE_mask_layer_calc_handles(), BKE_mask_point_free(), BKE_mask_spline_ensure_deform(), ELEM, BezTriple::h1, HD_AUTO, HD_VECT, i, LISTBASE_FOREACH, mask_evaluate_apply_point_parent(), MEM_dupallocN(), MaskSpline::points, MaskSpline::points_deform, MaskLayer::splines, MaskSpline::tot_point, and MaskSplinePoint::uw.
Referenced by BKE_mask_eval_update(), and BKE_mask_layer_evaluate().
| float * BKE_mask_point_segment_diff | ( | MaskSpline * | spline, |
| MaskSplinePoint * | point, | ||
| int | width, | ||
| int | height, | ||
| uint * | r_tot_diff_point ) |
Definition at line 794 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_curve_forward_diff_bezier(), BKE_mask_spline_point_array_from_point(), BKE_mask_spline_point_next_bezt(), BKE_mask_spline_resolution(), copy_v2_v2(), MEM_calloc_arrayN(), and BezTriple::vec.
Referenced by ED_mask_find_nearest_diff_point().
| float * BKE_mask_point_segment_feather_diff | ( | MaskSpline * | spline, |
| MaskSplinePoint * | point, | ||
| int | width, | ||
| int | height, | ||
| uint * | r_tot_feather_point ) |
Definition at line 769 of file mask_evaluate.cc.
References BKE_mask_point_normal(), BKE_mask_point_segment_co(), BKE_mask_point_weight(), BKE_mask_spline_feather_resolution(), float, i, and MEM_calloc_arrayN().
Referenced by ED_mask_find_nearest_diff_point().
| float(* BKE_mask_spline_differentiate | ( | MaskSpline * | spline, |
| int | width, | ||
| int | height, | ||
| uint * | r_tot_diff_point ))[2] |
Definition at line 181 of file mask_evaluate.cc.
References BKE_mask_spline_differentiate_with_resolution(), and BKE_mask_spline_resolution().
| int BKE_mask_spline_differentiate_calc_total | ( | const MaskSpline * | spline, |
| const uint | resol ) |
Definition at line 108 of file mask_evaluate.cc.
References MaskSpline::flag, MASK_SPLINE_CYCLIC, and MaskSpline::tot_point.
Referenced by BKE_mask_spline_differentiate_with_resolution(), mask_spline_feather_differentiated_points_with_resolution__double(), and mask_spline_feather_differentiated_points_with_resolution__even().
| float(* BKE_mask_spline_differentiate_with_resolution | ( | MaskSpline * | spline, |
| const uint | resol, | ||
| uint * | r_tot_diff_point ))[2] |
Definition at line 117 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_curve_forward_diff_bezier(), BKE_mask_spline_differentiate_calc_total(), BKE_mask_spline_point_array(), copy_v2_v2(), float, MASK_SPLINE_CYCLIC, MEM_calloc_arrayN(), and BezTriple::vec.
Referenced by BKE_mask_spline_differentiate(), BKE_maskrasterize_handle_init(), and draw_spline_curve().
| void BKE_mask_spline_feather_collapse_inner_loops | ( | MaskSpline * | spline, |
| float(*) | feather_points[2], | ||
| const uint | tot_feather_point ) |
Definition at line 319 of file mask_evaluate.cc.
References BUCKET_INDEX, fabsf, feather_bucket_add_edge(), feather_bucket_check_intersect(), feather_bucket_get_diagonal(), MaskSpline::flag, i, INIT_MINMAX2, MASK_SPLINE_CYCLIC, max, MEM_calloc_arrayN(), MEM_freeN(), min, min_ii(), minmax_v2v2_v2(), and next.
Referenced by BKE_maskrasterize_handle_init(), mask_spline_feather_differentiated_points_with_resolution__double(), and mask_spline_feather_differentiated_points_with_resolution__even().
| 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] |
values align with BKE_mask_spline_differentiate_with_resolution when resol arguments match.
Definition at line 705 of file mask_evaluate.cc.
References mask_spline_feather_differentiated_points_with_resolution__double(), mask_spline_feather_differentiated_points_with_resolution__even(), MASK_SPLINE_OFFSET_EVEN, MASK_SPLINE_OFFSET_SMOOTH, and MaskSpline::offset_mode.
Referenced by BKE_maskrasterize_handle_init(), and draw_spline_curve().
| float(* BKE_mask_spline_feather_points | ( | MaskSpline * | spline, |
| int * | r_tot_feather_point ))[2] |
Definition at line 722 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_mask_point_normal(), BKE_mask_point_segment_co(), BKE_mask_point_weight(), BKE_mask_spline_point_array(), float, i, madd_v2_v2v2fl(), MEM_calloc_arrayN(), MaskSpline::tot_point, MaskSplinePoint::tot_uw, MaskSplinePointUW::u, MaskSplinePoint::uw, and BezTriple::vec.
Referenced by draw_spline_points(), and ED_mask_feather_find_nearest().
| uint BKE_mask_spline_feather_resolution | ( | MaskSpline * | spline, |
| int | width, | ||
| int | height ) |
Definition at line 69 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_mask_spline_resolution(), fabsf, i, jump(), MASK_RESOL_MAX, max_ff(), MaskSpline::points, MaskSpline::tot_point, MaskSplinePoint::tot_uw, MaskSplinePointUW::u, MaskSplinePoint::uw, MaskSplinePointUW::w, and BezTriple::weight.
Referenced by BKE_mask_point_segment_feather_diff(), BKE_maskrasterize_handle_init(), and draw_spline_curve().
| int BKE_mask_spline_resolution | ( | MaskSpline * | spline, |
| int | width, | ||
| int | height ) |
Definition at line 30 of file mask_evaluate.cc.
References b, MaskSplinePoint::bezt, BKE_mask_spline_point_next_bezt(), float, i, len, len_v3v3(), MASK_RESOL_MAX, max_ii(), MaskSpline::points, MaskSpline::tot_point, and BezTriple::vec.
Referenced by BKE_mask_point_segment_diff(), BKE_mask_spline_differentiate(), BKE_mask_spline_feather_resolution(), BKE_maskrasterize_handle_init(), and draw_spline_curve().
|
static |
Definition at line 197 of file mask_evaluate.cc.
References FeatherEdgesBucket::alloc_segment, MEM_calloc_arrayN(), MEM_reallocN, FeatherEdgesBucket::segments, and FeatherEdgesBucket::tot_segment.
Referenced by BKE_mask_spline_feather_collapse_inner_loops().
|
static |
Definition at line 219 of file mask_evaluate.cc.
References copy_v2_v2(), i, INIT_MINMAX2, isect_seg_seg_v2_point(), isect_seg_seg_v2_simple(), minmax_v2v2_v2(), FeatherEdgesBucket::segments, FeatherEdgesBucket::tot_segment, and v2.
Referenced by BKE_mask_spline_feather_collapse_inner_loops().
|
static |
Definition at line 299 of file mask_evaluate.cc.
Referenced by BKE_mask_spline_feather_collapse_inner_loops().
|
static |
Definition at line 280 of file mask_evaluate.cc.
|
static |
Definition at line 829 of file mask_evaluate.cc.
References MaskSplinePoint::bezt, BKE_mask_point_parent_matrix_get(), mul_m3_v2(), and BezTriple::vec.
Referenced by BKE_mask_layer_evaluate_deform().
|
static |
only called from BKE_mask_spline_feather_differentiated_points_with_resolution() !
Definition at line 564 of file mask_evaluate.cc.
References add_v2_v2(), MaskSplinePoint::bezt, BKE_curve_forward_diff_bezier(), BKE_mask_point_segment_co(), BKE_mask_point_weight(), BKE_mask_point_weight_scalar(), BKE_mask_spline_differentiate_calc_total(), BKE_mask_spline_feather_collapse_inner_loops(), BKE_mask_spline_point_array(), copy_v2_v2(), dist_ensure_v2_v2fl(), MaskSpline::flag, float, len_v2v2(), MASK_SPLINE_CYCLIC, MASK_SPLINE_NOINTERSECT, MEM_calloc_arrayN(), mul_v2_fl(), normalize_v2(), sub_v2_v2v2(), MaskSpline::tot_point, MaskSplinePoint::tot_uw, BezTriple::vec, and BezTriple::weight.
Referenced by BKE_mask_spline_feather_differentiated_points_with_resolution().
|
static |
only called from BKE_mask_spline_feather_differentiated_points_with_resolution() !
Definition at line 490 of file mask_evaluate.cc.
References BKE_mask_point_normal(), BKE_mask_point_segment_co(), BKE_mask_point_weight(), BKE_mask_spline_differentiate_calc_total(), BKE_mask_spline_feather_collapse_inner_loops(), BKE_mask_spline_point_array(), MaskSpline::flag, float, madd_v2_v2v2fl(), MASK_SPLINE_CYCLIC, MASK_SPLINE_NOINTERSECT, MEM_calloc_arrayN(), and MaskSpline::tot_point.
Referenced by BKE_mask_spline_feather_differentiated_points_with_resolution().