Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-06-07 00:05:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-07 00:05:58 +0400
commit3e8ad394af94a88791ced5aae573f105fb3d501d (patch)
tree0a6e4c16eff916d9001d4453463065f86a2026f3 /source/blender
parentfdf0d01d08a91dbd0260b49d2b9cc91b6cab570f (diff)
code cleanup: remove unused mask args
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_mask.h11
-rw-r--r--source/blender/blenkernel/intern/mask.c22
-rw-r--r--source/blender/editors/mask/mask_add.c14
3 files changed, 23 insertions, 24 deletions
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index 19feb4d8f2e..2537e84a62c 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -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);
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index aaefa558c9b..315b97c1866 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -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]);
}
}
}
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index f8c36e866d7..7ffff2b06e5 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -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);