[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49653] trunk/blender/source/blender: mask - draw both sides of the curve when `filled` option is disabled.
Campbell Barton
ideasman42 at gmail.com
Tue Aug 7 15:37:16 CEST 2012
Revision: 49653
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49653
Author: campbellbarton
Date: 2012-08-07 13:37:16 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
mask - draw both sides of the curve when `filled` option is disabled.
Modified Paths:
--------------
trunk/blender/source/blender/editors/mask/mask_draw.c
trunk/blender/source/blender/python/intern/bpy_props.c
Modified: trunk/blender/source/blender/editors/mask/mask_draw.c
===================================================================
--- trunk/blender/source/blender/editors/mask/mask_draw.c 2012-08-07 13:27:19 UTC (rev 49652)
+++ trunk/blender/source/blender/editors/mask/mask_draw.c 2012-08-07 13:37:16 UTC (rev 49653)
@@ -368,6 +368,7 @@
const short is_spline_sel = (spline->flag & SELECT) && (masklay->restrictflag & MASK_RESTRICT_SELECT) == 0;
const short is_smooth = (draw_flag & MASK_DRAWFLAG_SMOOTH);
+ const short is_fill = (spline->flag & MASK_SPLINE_NOFILL) == 0;
int tot_diff_point;
float (*diff_points)[2];
@@ -394,8 +395,26 @@
TRUE, is_smooth, is_active,
rgb_tmp, draw_type);
- /* TODO, draw mirror values when MASK_SPLINE_NOFILL is set */
+ if (!is_fill) {
+ float *fp = &diff_points[0][0];
+ float *fp_feather = &feather_points[0][0];
+ float tvec[2];
+ int i;
+
+ BLI_assert(tot_diff_point == tot_feather_point);
+
+ for (i = 0; i < tot_diff_point; i++, fp += 2, fp_feather += 2) {
+ sub_v2_v2v2(tvec, fp, fp_feather);
+ add_v2_v2v2(fp_feather, fp, tvec);
+ }
+
+ /* same as above */
+ mask_draw_curve_type(spline, feather_points, tot_feather_point,
+ TRUE, is_smooth, is_active,
+ rgb_tmp, draw_type);
+ }
+
MEM_freeN(feather_points);
/* draw main curve */
Modified: trunk/blender/source/blender/python/intern/bpy_props.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_props.c 2012-08-07 13:27:19 UTC (rev 49652)
+++ trunk/blender/source/blender/python/intern/bpy_props.c 2012-08-07 13:37:16 UTC (rev 49653)
@@ -1327,7 +1327,7 @@
if (is_itemf == FALSE) {
/* note: this must be postponed until after #RNA_def_property_duplicate_pointers
- * otherwise if this is a generator it may free the strings before we get copy them */
+ * otherwise if this is a generator it may free the strings before we copy them */
Py_DECREF(items_fast);
MEM_freeN(eitems);
More information about the Bf-blender-cvs
mailing list