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-08-05 00:17:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-05 00:17:22 +0400
commit2044b62370f3e26037699577824201fb684578a1 (patch)
tree013fe43267a73cec6ea2ffe0a340186ce66c7c7a /source/blender/editors/mask
parent3d204744147c136a2d57ca3ba52e424b50ea48c2 (diff)
resolve some issues with curve resolution calculaction
- resolution could become so high that it would wrap around to a negative number, now check for small numbers before doing float division. - resolution was being calculated in some cases when it already met the clamp value - now this is skipped.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r--source/blender/editors/mask/mask_add.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index c928e90b422..856db013872 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -91,13 +91,14 @@ static int find_nearest_diff_point(const bContext *C, Mask *mask, const float no
i++, cur_point++)
{
float *diff_points;
- int tot_diff_point;
+ unsigned int tot_diff_point;
diff_points = BKE_mask_point_segment_diff_with_resolution(spline, cur_point, width, height,
&tot_diff_point);
if (diff_points) {
- int i, tot_feather_point, tot_point;
+ int i, tot_point;
+ unsigned int tot_feather_point;
float *feather_points = NULL, *points;
if (feather) {