[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49449] trunk/blender/source/blender/ editors/mask/mask_select.c: mask selection invert wasnt working.
Campbell Barton
ideasman42 at gmail.com
Wed Aug 1 15:34:20 CEST 2012
Revision: 49449
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49449
Author: campbellbarton
Date: 2012-08-01 13:34:20 +0000 (Wed, 01 Aug 2012)
Log Message:
-----------
mask selection invert wasnt working.
Modified Paths:
--------------
trunk/blender/source/blender/editors/mask/mask_select.c
Modified: trunk/blender/source/blender/editors/mask/mask_select.c
===================================================================
--- trunk/blender/source/blender/editors/mask/mask_select.c 2012-08-01 13:28:19 UTC (rev 49448)
+++ trunk/blender/source/blender/editors/mask/mask_select.c 2012-08-01 13:34:20 UTC (rev 49449)
@@ -147,7 +147,26 @@
continue;
}
- ED_mask_layer_select_set(masklay, (action == SEL_SELECT) ? TRUE : FALSE);
+ if (action == SEL_INVERT) {
+ /* we don't have generic functons for this, its restricted to this operator
+ * if one day we need to re-use such functionality, they can be split out */
+
+ MaskSpline *spline;
+ if (masklay->restrictflag & MASK_RESTRICT_SELECT) {
+ continue;
+ }
+ for (spline = masklay->splines.first; spline; spline = spline->next) {
+ int i;
+ for (i = 0; i < spline->tot_point; i++) {
+ MaskSplinePoint *point = &spline->points[i];
+ BKE_mask_point_select_set(point, !MASKPOINT_ISSEL_ANY(point));
+ }
+ }
+
+ }
+ else {
+ ED_mask_layer_select_set(masklay, (action == SEL_SELECT) ? TRUE : FALSE);
+ }
}
}
More information about the Bf-blender-cvs
mailing list