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-01 17:34:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-01 17:34:20 +0400
commitdd6d78840026e493045b441723e60546abdeefb6 (patch)
treec83f851b4d10f99bbc7ec9681aa1c228ea1c76d1 /source/blender/editors/mask
parent179d00fb9cc2a6746c3cc3e31f6573380fc02195 (diff)
mask selection invert wasnt working.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r--source/blender/editors/mask/mask_select.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 9c1b4f0fd42..e746f4258a5 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -147,7 +147,26 @@ void ED_mask_select_toggle_all(Mask *mask, int action)
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);
+ }
}
}