[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50230] trunk/blender/source/blender/ editors/mask/mask_draw.c: ensure there are always the same number of feather points and non feather points when drawing .

Campbell Barton ideasman42 at gmail.com
Sun Aug 26 22:22:43 CEST 2012


Revision: 50230
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50230
Author:   campbellbarton
Date:     2012-08-26 20:22:42 +0000 (Sun, 26 Aug 2012)
Log Message:
-----------
ensure there are always the same number of feather points and non feather points when drawing.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mask/mask_draw.c

Modified: trunk/blender/source/blender/editors/mask/mask_draw.c
===================================================================
--- trunk/blender/source/blender/editors/mask/mask_draw.c	2012-08-26 19:36:56 UTC (rev 50229)
+++ trunk/blender/source/blender/editors/mask/mask_draw.c	2012-08-26 20:22:42 UTC (rev 50230)
@@ -365,6 +365,9 @@
                               const short is_active,
                               int width, int height)
 {
+	const unsigned int resol = maxi(BKE_mask_spline_feather_resolution(spline, width, height),
+	                                BKE_mask_spline_resolution(spline, width, height));
+
 	unsigned char rgb_tmp[4];
 
 	const short is_spline_sel = (spline->flag & SELECT) && (masklay->restrictflag & MASK_RESTRICT_SELECT) == 0;
@@ -377,7 +380,7 @@
 	int tot_feather_point;
 	float (*feather_points)[2];
 
-	diff_points = BKE_mask_spline_differentiate_with_resolution(spline, width, height, &tot_diff_point);
+	diff_points = BKE_mask_spline_differentiate_with_resolution_ex(spline, &tot_diff_point, resol);
 
 	if (!diff_points)
 		return;
@@ -388,7 +391,7 @@
 		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 	}
 
-	feather_points = BKE_mask_spline_feather_differentiated_points_with_resolution(spline, width, height, &tot_feather_point, (is_fill != FALSE));
+	feather_points = BKE_mask_spline_feather_differentiated_points_with_resolution_ex(spline, &tot_feather_point, resol, (is_fill != FALSE));
 
 	/* draw feather */
 	mask_spline_feather_color_get(masklay, spline, is_spline_sel, rgb_tmp);




More information about the Bf-blender-cvs mailing list