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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-20 13:47:19 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-20 13:47:19 +0400
commitb54ac216220bfbd54c6a1799f868166643a723fa (patch)
treef57922bb7f821f29ca5f9ae8534085db9aec9802 /source/blender
parentd71bcab0762d2dedf961136d831b6b0ad7dbc43c (diff)
Code cleanup: remove unused functions from mask module
This functions doesn't seem to be used even from a commented code.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_mask.h15
-rw-r--r--source/blender/blenkernel/intern/mask.c97
-rw-r--r--source/blender/blenkernel/intern/mask_evaluate.c28
3 files changed, 5 insertions, 135 deletions
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index d73249041e8..8d2233fefd1 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -57,7 +57,6 @@ void BKE_mask_layer_active_set(struct Mask *mask, struct MaskLayer *masklay);
void BKE_mask_layer_remove(struct Mask *mask, struct MaskLayer *masklay);
void BKE_mask_layer_free_shapes(struct MaskLayer *masklay);
-void BKE_mask_layer_free_deform(struct MaskLayer *mask_layer);
void BKE_mask_layer_free(struct MaskLayer *masklay);
void BKE_mask_layer_free_list(struct ListBase *masklayers);
void BKE_mask_spline_free(struct MaskSpline *spline);
@@ -136,9 +135,6 @@ void BKE_mask_calc_handle_point_auto(struct MaskSpline *spline, struct MaskSplin
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_layer_calc_handles(struct MaskLayer *masklay);
-void BKE_mask_layer_calc_handles_deform(struct MaskLayer *masklay);
-void BKE_mask_calc_handles(struct Mask *mask);
-void BKE_mask_update_deform(struct Mask *mask);
void BKE_mask_spline_ensure_deform(struct MaskSpline *spline);
void BKE_mask_point_parent_matrix_get(struct MaskSplinePoint *point, float ctime, float parent_matrix[3][3]);
@@ -193,25 +189,16 @@ unsigned int BKE_mask_spline_resolution(struct MaskSpline *spline, int width, in
unsigned int BKE_mask_spline_feather_resolution(struct MaskSpline *spline, int width, int height);
int BKE_mask_spline_differentiate_calc_total(const struct MaskSpline *spline, const unsigned int resol);
-float (*BKE_mask_spline_differentiate(struct MaskSpline *spline, unsigned int *tot_diff_point))[2];
-float (*BKE_mask_spline_feather_differentiated_points(struct MaskSpline *spline, unsigned int *tot_feather_point))[2];
-
float (*BKE_mask_spline_differentiate_with_resolution_ex(struct MaskSpline *spline, unsigned int *tot_diff_point,
const unsigned int resol))[2];
void BKE_mask_spline_feather_collapse_inner_loops(struct MaskSpline *spline, float (*feather_points)[2], const unsigned int tot_feather_point);
float (*BKE_mask_spline_differentiate_with_resolution(struct MaskSpline *spline, int width, int height, unsigned int *tot_diff_point))[2];
float (*BKE_mask_spline_feather_differentiated_points_with_resolution_ex(struct MaskSpline *spline, unsigned int *tot_feather_point,
const unsigned int resol, const int do_feather_isect))[2];
-float (*BKE_mask_spline_feather_differentiated_points_with_resolution(struct MaskSpline *spline, int width, int height,
- unsigned int *tot_feather_point, const int do_feather_isect))[2];
+
/* *** mask point functions which involve evaluation *** */
float (*BKE_mask_spline_feather_points(struct MaskSpline *spline, int *tot_feather_point))[2];
-float *BKE_mask_point_segment_diff(struct MaskSpline *spline, struct MaskSplinePoint *point,
- unsigned int *tot_diff_point);
-float *BKE_mask_point_segment_feather_diff(struct MaskSpline *spline, struct MaskSplinePoint *point,
- unsigned int *tot_feather_point);
-
float *BKE_mask_point_segment_diff_with_resolution(struct MaskSpline *spline, struct MaskSplinePoint *point,
int width, int height,
unsigned int *tot_diff_point);
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index b20b4294f84..66edda76634 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -106,23 +106,6 @@ BezTriple *BKE_mask_spline_point_next_bezt(MaskSpline *spline, MaskSplinePoint *
}
}
-#if 0
-static BezTriple *mask_spline_point_prev_bezt(MaskSpline *spline, MaskSplinePoint *points_array, MaskSplinePoint *point)
-{
- if (point == points_array) {
- if (spline->flag & MASK_SPLINE_CYCLIC) {
- return &(points_array[0].bezt);
- }
- else {
- return NULL;
- }
- }
- else {
- return &((point - 1))->bezt;
- }
-}
-#endif
-
MaskSplinePoint *BKE_mask_spline_point_array(MaskSpline *spline)
{
return spline->points_deform ? spline->points_deform : spline->points;
@@ -904,26 +887,6 @@ void BKE_mask_layer_free_shapes(MaskLayer *masklay)
}
}
-void BKE_mask_layer_free_deform(MaskLayer *mask_layer)
-{
- MaskSpline *mask_spline;
-
- for (mask_spline = mask_layer->splines.first;
- mask_spline;
- mask_spline = mask_spline->next)
- {
- if (mask_spline->points_deform) {
- int i;
- MaskSplinePoint *points_deform = mask_spline->points_deform;
- for (i = 0; i < mask_spline->tot_point; i++) {
- BKE_mask_point_free(&points_deform[i]);
- }
- MEM_freeN(points_deform);
- mask_spline->points_deform = NULL;
- }
- }
-}
-
void BKE_mask_layer_free(MaskLayer *masklay)
{
/* free splines */
@@ -1026,6 +989,7 @@ void BKE_mask_coord_from_frame(float r_co[2], const float co[2], const float fra
r_co[1] = ((co[1] - 0.5f) * (frame_size[1] / frame_size[0])) + 0.5f;
}
}
+
void BKE_mask_coord_from_movieclip(MovieClip *clip, MovieClipUser *user, float r_co[2], const float co[2])
{
float aspx, aspy;
@@ -1039,6 +1003,7 @@ void BKE_mask_coord_from_movieclip(MovieClip *clip, MovieClipUser *user, float r
BKE_mask_coord_from_frame(r_co, co, frame_size);
}
+
void BKE_mask_coord_from_image(Image *image, ImageUser *iuser, float r_co[2], const float co[2])
{
float aspx, aspy;
@@ -1068,6 +1033,7 @@ void BKE_mask_coord_to_frame(float r_co[2], const float co[2], const float frame
r_co[1] = ((co[1] - 0.5f) / (frame_size[1] / frame_size[0])) + 0.5f;
}
}
+
void BKE_mask_coord_to_movieclip(MovieClip *clip, MovieClipUser *user, float r_co[2], const float co[2])
{
float aspx, aspy;
@@ -1081,6 +1047,7 @@ void BKE_mask_coord_to_movieclip(MovieClip *clip, MovieClipUser *user, float r_c
BKE_mask_coord_to_frame(r_co, co, frame_size);
}
+
void BKE_mask_coord_to_image(Image *image, ImageUser *iuser, float r_co[2], const float co[2])
{
float aspx, aspy;
@@ -1361,62 +1328,6 @@ void BKE_mask_layer_calc_handles(MaskLayer *masklay)
}
}
-void BKE_mask_layer_calc_handles_deform(MaskLayer *masklay)
-{
- MaskSpline *spline;
- for (spline = masklay->splines.first; spline; spline = spline->next) {
- int i;
- for (i = 0; i < spline->tot_point; i++) {
- BKE_mask_calc_handle_point(spline, &spline->points_deform[i]);
- }
- }
-}
-
-void BKE_mask_calc_handles(Mask *mask)
-{
- MaskLayer *masklay;
- for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
- BKE_mask_layer_calc_handles(masklay);
- }
-}
-
-void BKE_mask_update_deform(Mask *mask)
-{
- MaskLayer *masklay;
-
- for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
- MaskSpline *spline;
-
- for (spline = masklay->splines.first; spline; spline = spline->next) {
- int i;
-
- for (i = 0; i < spline->tot_point; i++) {
- const int i_prev = (i - 1) % spline->tot_point;
- const int i_next = (i + 1) % spline->tot_point;
-
- BezTriple *bezt_prev = &spline->points[i_prev].bezt;
- BezTriple *bezt = &spline->points[i].bezt;
- BezTriple *bezt_next = &spline->points[i_next].bezt;
-
- BezTriple *bezt_def_prev = &spline->points_deform[i_prev].bezt;
- BezTriple *bezt_def = &spline->points_deform[i].bezt;
- BezTriple *bezt_def_next = &spline->points_deform[i_next].bezt;
-
- float w_src[4];
- int j;
-
- for (j = 0; j <= 2; j += 2) { /* (0, 2) */
- // printf("--- %d %d, %d, %d\n", i, j, i_prev, i_next);
- barycentric_weights_v2(bezt_prev->vec[1], bezt->vec[1], bezt_next->vec[1],
- bezt->vec[j], w_src);
- interp_v3_v3v3v3(bezt_def->vec[j],
- bezt_def_prev->vec[1], bezt_def->vec[1], bezt_def_next->vec[1], w_src);
- }
- }
- }
- }
-}
-
void BKE_mask_spline_ensure_deform(MaskSpline *spline)
{
int allocated_points = (MEM_allocN_len(spline->points_deform) / sizeof(*spline->points_deform));
diff --git a/source/blender/blenkernel/intern/mask_evaluate.c b/source/blender/blenkernel/intern/mask_evaluate.c
index abbcc7664a8..2a4ba5aa3af 100644
--- a/source/blender/blenkernel/intern/mask_evaluate.c
+++ b/source/blender/blenkernel/intern/mask_evaluate.c
@@ -222,11 +222,6 @@ float (*BKE_mask_spline_differentiate_with_resolution(MaskSpline *spline, int wi
return BKE_mask_spline_differentiate_with_resolution_ex(spline, tot_diff_point, resol);
}
-float (*BKE_mask_spline_differentiate(MaskSpline *spline, unsigned int *tot_diff_point))[2]
-{
- return BKE_mask_spline_differentiate_with_resolution(spline, 0, 0, tot_diff_point);
-}
-
/* ** feather points self-intersection collapse routine ** */
typedef struct FeatherEdgesBucket {
@@ -734,19 +729,6 @@ float (*BKE_mask_spline_feather_differentiated_points_with_resolution_ex(MaskSpl
}
}
-float (*BKE_mask_spline_feather_differentiated_points_with_resolution(MaskSpline *spline, int width, int height,
- unsigned int *tot_feather_point, const int do_feather_isect))[2]
-{
- unsigned int resol = BKE_mask_spline_feather_resolution(spline, width, height);
-
- return BKE_mask_spline_feather_differentiated_points_with_resolution_ex(spline, tot_feather_point, resol, do_feather_isect);
-}
-
-float (*BKE_mask_spline_feather_differentiated_points(MaskSpline *spline, unsigned int *tot_feather_point))[2]
-{
- return BKE_mask_spline_feather_differentiated_points_with_resolution(spline, 0, 0, tot_feather_point, TRUE);
-}
-
float (*BKE_mask_spline_feather_points(MaskSpline *spline, int *tot_feather_point))[2]
{
MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline);
@@ -822,11 +804,6 @@ float *BKE_mask_point_segment_feather_diff_with_resolution(MaskSpline *spline, M
return feather;
}
-float *BKE_mask_point_segment_feather_diff(MaskSpline *spline, MaskSplinePoint *point, unsigned int *tot_feather_point)
-{
- return BKE_mask_point_segment_feather_diff_with_resolution(spline, point, 0, 0, tot_feather_point);
-}
-
float *BKE_mask_point_segment_diff_with_resolution(MaskSpline *spline, MaskSplinePoint *point,
int width, int height, unsigned int *tot_diff_point)
{
@@ -856,8 +833,3 @@ float *BKE_mask_point_segment_diff_with_resolution(MaskSpline *spline, MaskSplin
return diff_points;
}
-
-float *BKE_mask_point_segment_diff(MaskSpline *spline, MaskSplinePoint *point, unsigned int *tot_diff_point)
-{
- return BKE_mask_point_segment_diff_with_resolution(spline, point, 0, 0, tot_diff_point);
-}