[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46634] branches/soc-2011-tomato/source/ blender/editors/mask/mask_ops.c: fix for glitch adding markers, when there are 2 splines, and the first spline wasnt active but _was_ selected, Ctrl+Click would use the non-active selected spline.
Campbell Barton
ideasman42 at gmail.com
Mon May 14 17:24:14 CEST 2012
Revision: 46634
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46634
Author: campbellbarton
Date: 2012-05-14 15:24:13 +0000 (Mon, 14 May 2012)
Log Message:
-----------
fix for glitch adding markers, when there are 2 splines, and the first spline wasnt active but _was_ selected, Ctrl+Click would use the non-active selected spline.
now use the active spline when available.
also no need to de-select when adding a new vertex inbetween 2 verts in a spline.
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c 2012-05-14 14:55:10 UTC (rev 46633)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c 2012-05-14 15:24:13 UTC (rev 46634)
@@ -1197,7 +1197,10 @@
MaskSplinePoint *new_point_array, *new_point;
int point_index = point - spline->points;
+ /* adding _could_ deselect, for now don't */
+#if 0
toggle_selection_all(mask, SEL_DESELECT);
+#endif
new_point_array = MEM_callocN(sizeof(MaskSplinePoint) * (spline->tot_point + 1), "add mask vert points");
@@ -1225,13 +1228,21 @@
/* **** add extrude vertex **** */
-static void finSelectedSplinePoint(MaskShape *shape, MaskSpline **spline, MaskSplinePoint **point)
+static void finSelectedSplinePoint(MaskShape *shape, MaskSpline **spline, MaskSplinePoint **point, short check_active)
{
MaskSpline *cur_spline = shape->splines.first;
*spline = NULL;
*point = NULL;
+ if (check_active) {
+ if (shape->act_spline && shape->act_point) {
+ *spline = shape->act_spline;
+ *point = shape->act_point;
+ return;
+ }
+ }
+
while (cur_spline) {
int i;
@@ -1264,6 +1275,11 @@
MaskSpline *spline;
MaskSplinePoint *point, *new_point = NULL;
+ /* adding _could_ deselect, for now don't */
+#if 0
+ toggle_selection_all(mask, SEL_DESELECT);
+#endif
+
shape = BKE_mask_shape_active(mask);
if (!shape) {
@@ -1274,7 +1290,7 @@
point = NULL;
}
else {
- finSelectedSplinePoint(shape, &spline, &point);
+ finSelectedSplinePoint(shape, &spline, &point, TRUE);
}
if (!spline) {
More information about the Bf-blender-cvs
mailing list