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/blenkernel/intern/mask_rasterize.c
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/blenkernel/intern/mask_rasterize.c')
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index b26e6de59c4..9e1f4e2cfb2 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -577,9 +577,9 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
float (*diff_feather_points)[2];
int tot_diff_feather_points;
- const int resol_a = BKE_mask_spline_resolution(spline, width, height) / 4;
- const int resol_b = BKE_mask_spline_feather_resolution(spline, width, height) / 4;
- const int resol = CLAMPIS(MAX2(resol_a, resol_b), 4, 512);
+ const unsigned int resol_a = BKE_mask_spline_resolution(spline, width, height) / 4;
+ const unsigned int resol_b = BKE_mask_spline_feather_resolution(spline, width, height) / 4;
+ const unsigned int resol = CLAMPIS(MAX2(resol_a, resol_b), 4, 512);
diff_points = BKE_mask_spline_differentiate_with_resolution_ex(
spline, &tot_diff_point, resol);