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>2016-01-08 14:25:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-08 14:26:21 +0300
commit7af548f87e410212eee266b03ca97c9bce7faf88 (patch)
tree99f3a9f9ab982f8f10a95a0e0ce68967cadc1e74 /source/blender/blenkernel/intern/tracking.c
parent707500b5c49b4fb31c002b94d9cc6a6d5e9797bb (diff)
Tracking: Cleanup, reduce scope of some variables
Diffstat (limited to 'source/blender/blenkernel/intern/tracking.c')
-rw-r--r--source/blender/blenkernel/intern/tracking.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 4409833fcdd..094db3cfcc9 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -837,29 +837,22 @@ static void track_mask_gpencil_layer_rasterize(int frame_width, int frame_height
while (stroke) {
bGPDspoint *stroke_points = stroke->points;
- int *mask_points, *point;
- int i;
-
if (stroke->flag & GP_STROKE_2DSPACE) {
+ int *mask_points, *point;
point = mask_points = MEM_callocN(2 * stroke->totpoints * sizeof(int),
"track mask rasterization points");
-
- for (i = 0; i < stroke->totpoints; i++, point += 2) {
+ for (int i = 0; i < stroke->totpoints; i++, point += 2) {
point[0] = (stroke_points[i].x - marker->search_min[0]) * frame_width;
point[1] = (stroke_points[i].y - marker->search_min[1]) * frame_height;
}
-
/* TODO: add an option to control whether AA is enabled or not */
fill_poly_v2i_n(0, 0, mask_width, mask_height,
(const int (*)[2])mask_points, stroke->totpoints,
track_mask_set_pixel_cb, &data);
-
MEM_freeN(mask_points);
}
-
stroke = stroke->next;
}
-
frame = frame->next;
}
}