code cleanup: remove unused mask args
This commit is contained in:
@@ -122,13 +122,12 @@ void BKE_mask_update_display(struct Mask *mask, float ctime);
|
||||
void BKE_mask_evaluate_all_masks(struct Main *bmain, float ctime, const int do_newframe);
|
||||
void BKE_mask_update_scene(struct Main *bmain, struct Scene *scene, const int do_newframe);
|
||||
void BKE_mask_parent_init(struct MaskParent *parent);
|
||||
void BKE_mask_calc_handle_adjacent_interp(struct Mask *mask, struct MaskSpline *spline, struct MaskSplinePoint *point,
|
||||
const float u);
|
||||
void BKE_mask_calc_tangent_polyline(struct Mask *mask, struct MaskSpline *spline, struct MaskSplinePoint *point, float t[2]);
|
||||
void BKE_mask_calc_handle_point(struct Mask *mask, struct MaskSpline *spline, struct MaskSplinePoint *point);
|
||||
void BKE_mask_calc_handle_point_auto(struct Mask *mask, struct MaskSpline *spline, struct MaskSplinePoint *point,
|
||||
void BKE_mask_calc_handle_adjacent_interp(struct MaskSpline *spline, struct MaskSplinePoint *point, const 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,
|
||||
const short do_recalc_length);
|
||||
void BKE_mask_get_handle_point_adjacent(struct Mask *mask, struct MaskSpline *spline, struct MaskSplinePoint *point,
|
||||
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_calc_handles(struct Mask *mask);
|
||||
void BKE_mask_spline_ensure_deform(struct MaskSpline *spline);
|
||||
|
@@ -1228,7 +1228,7 @@ static void mask_calc_point_handle(MaskSplinePoint *point, MaskSplinePoint *poin
|
||||
#endif
|
||||
}
|
||||
|
||||
void BKE_mask_get_handle_point_adjacent(Mask *UNUSED(mask), MaskSpline *spline, MaskSplinePoint *point,
|
||||
void BKE_mask_get_handle_point_adjacent(MaskSpline *spline, MaskSplinePoint *point,
|
||||
MaskSplinePoint **r_point_prev, MaskSplinePoint **r_point_next)
|
||||
{
|
||||
int i = (int)(point - spline->points);
|
||||
@@ -1241,13 +1241,13 @@ void BKE_mask_get_handle_point_adjacent(Mask *UNUSED(mask), MaskSpline *spline,
|
||||
|
||||
/* calculates the tanget of a point by its previous and next
|
||||
* (ignoring handles - as if its a poly line) */
|
||||
void BKE_mask_calc_tangent_polyline(Mask *mask, MaskSpline *spline, MaskSplinePoint *point, float t[2])
|
||||
void BKE_mask_calc_tangent_polyline(MaskSpline *spline, MaskSplinePoint *point, float t[2])
|
||||
{
|
||||
float tvec_a[2], tvec_b[2];
|
||||
|
||||
MaskSplinePoint *point_prev, *point_next;
|
||||
|
||||
BKE_mask_get_handle_point_adjacent(mask, spline, point,
|
||||
BKE_mask_get_handle_point_adjacent(spline, point,
|
||||
&point_prev, &point_next);
|
||||
|
||||
if (point_prev) {
|
||||
@@ -1270,11 +1270,11 @@ void BKE_mask_calc_tangent_polyline(Mask *mask, MaskSpline *spline, MaskSplinePo
|
||||
normalize_v2(t);
|
||||
}
|
||||
|
||||
void BKE_mask_calc_handle_point(Mask *mask, MaskSpline *spline, MaskSplinePoint *point)
|
||||
void BKE_mask_calc_handle_point(MaskSpline *spline, MaskSplinePoint *point)
|
||||
{
|
||||
MaskSplinePoint *point_prev, *point_next;
|
||||
|
||||
BKE_mask_get_handle_point_adjacent(mask, spline, point,
|
||||
BKE_mask_get_handle_point_adjacent(spline, point,
|
||||
&point_prev, &point_next);
|
||||
|
||||
mask_calc_point_handle(point, point_prev, point_next);
|
||||
@@ -1291,7 +1291,7 @@ static void enforce_dist_v2_v2fl(float v1[2], const float v2[2], const float dis
|
||||
}
|
||||
}
|
||||
|
||||
void BKE_mask_calc_handle_adjacent_interp(Mask *mask, MaskSpline *spline, MaskSplinePoint *point, const float u)
|
||||
void BKE_mask_calc_handle_adjacent_interp(MaskSpline *spline, MaskSplinePoint *point, const float u)
|
||||
{
|
||||
/* TODO! - make this interpolate between siblings - not always midpoint! */
|
||||
int length_tot = 0;
|
||||
@@ -1303,7 +1303,7 @@ void BKE_mask_calc_handle_adjacent_interp(Mask *mask, MaskSpline *spline, MaskSp
|
||||
|
||||
BLI_assert(u >= 0.0f && u <= 1.0f);
|
||||
|
||||
BKE_mask_get_handle_point_adjacent(mask, spline, point,
|
||||
BKE_mask_get_handle_point_adjacent(spline, point,
|
||||
&point_prev, &point_next);
|
||||
|
||||
if (point_prev && point_next) {
|
||||
@@ -1344,7 +1344,7 @@ void BKE_mask_calc_handle_adjacent_interp(Mask *mask, MaskSpline *spline, MaskSp
|
||||
*
|
||||
* Useful for giving sane defaults.
|
||||
*/
|
||||
void BKE_mask_calc_handle_point_auto(Mask *mask, MaskSpline *spline, MaskSplinePoint *point,
|
||||
void BKE_mask_calc_handle_point_auto(MaskSpline *spline, MaskSplinePoint *point,
|
||||
const short do_recalc_length)
|
||||
{
|
||||
MaskSplinePoint *point_prev, *point_next;
|
||||
@@ -1353,7 +1353,7 @@ void BKE_mask_calc_handle_point_auto(Mask *mask, MaskSpline *spline, MaskSplineP
|
||||
(len_v3v3(point->bezt.vec[0], point->bezt.vec[1]) +
|
||||
len_v3v3(point->bezt.vec[1], point->bezt.vec[2])) / 2.0f;
|
||||
|
||||
BKE_mask_get_handle_point_adjacent(mask, spline, point,
|
||||
BKE_mask_get_handle_point_adjacent(spline, point,
|
||||
&point_prev, &point_next);
|
||||
|
||||
point->bezt.h1 = HD_AUTO;
|
||||
@@ -1381,11 +1381,11 @@ void BKE_mask_calc_handles(Mask *mask)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < spline->tot_point; i++) {
|
||||
BKE_mask_calc_handle_point(mask, spline, &spline->points[i]);
|
||||
BKE_mask_calc_handle_point(spline, &spline->points[i]);
|
||||
|
||||
/* could be done in a different function... */
|
||||
if (spline->points_deform) {
|
||||
BKE_mask_calc_handle_point(mask, spline, &spline->points[i]);
|
||||
BKE_mask_calc_handle_point(spline, &spline->points[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@ static void setup_vertex_point(bContext *C, Mask *mask, MaskSpline *spline, Mask
|
||||
add_v2_v2(bezt->vec[2], vec);
|
||||
|
||||
if (reference_adjacent) {
|
||||
BKE_mask_calc_handle_adjacent_interp(mask, spline, new_point, u);
|
||||
BKE_mask_calc_handle_adjacent_interp(spline, new_point, u);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -287,8 +287,8 @@ static void setup_vertex_point(bContext *C, Mask *mask, MaskSpline *spline, Mask
|
||||
add_v2_v2(bezt->vec[0], vec);
|
||||
sub_v2_v2(bezt->vec[2], vec);
|
||||
#else
|
||||
BKE_mask_calc_handle_point_auto(mask, spline, new_point, TRUE);
|
||||
BKE_mask_calc_handle_adjacent_interp(mask, spline, new_point, u);
|
||||
BKE_mask_calc_handle_point_auto(spline, new_point, TRUE);
|
||||
BKE_mask_calc_handle_adjacent_interp(spline, new_point, u);
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -425,7 +425,7 @@ static int add_vertex_extrude(bContext *C, Mask *mask, MaskLayer *masklay, const
|
||||
if ((spline->flag & MASK_SPLINE_CYCLIC) ||
|
||||
(point_index > 0 && point_index != spline->tot_point - 1))
|
||||
{
|
||||
BKE_mask_calc_tangent_polyline(mask, spline, point, tangent_point);
|
||||
BKE_mask_calc_tangent_polyline(spline, point, tangent_point);
|
||||
sub_v2_v2v2(tangent_co, co, point->bezt.vec[1]);
|
||||
|
||||
if (dot_v2v2(tangent_point, tangent_co) < 0.0f) {
|
||||
@@ -487,7 +487,7 @@ static int add_vertex_extrude(bContext *C, Mask *mask, MaskLayer *masklay, const
|
||||
|
||||
if (do_recalc_src) {
|
||||
/* TODO, update keyframes in time */
|
||||
BKE_mask_calc_handle_point_auto(mask, spline, ref_point, FALSE);
|
||||
BKE_mask_calc_handle_point_auto(spline, ref_point, FALSE);
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
|
||||
@@ -572,8 +572,8 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
|
||||
spline->flag |= MASK_SPLINE_CYCLIC;
|
||||
|
||||
/* TODO, update keyframes in time */
|
||||
BKE_mask_calc_handle_point_auto(mask, spline, point, FALSE);
|
||||
BKE_mask_calc_handle_point_auto(mask, spline, point_other, FALSE);
|
||||
BKE_mask_calc_handle_point_auto(spline, point, FALSE);
|
||||
BKE_mask_calc_handle_point_auto(spline, point_other, FALSE);
|
||||
|
||||
/* TODO: only update this spline */
|
||||
BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
|
||||
|
Reference in New Issue
Block a user