[Bf-blender-cvs] [3e3000d] soc-2013-paint: Fixes:

Antony Riakiotakis noreply at git.blender.org
Fri Apr 18 23:57:33 CEST 2014


Commit: 3e3000dade7ea336e23c68f7ce9e83ed78e56f47
Author: Antony Riakiotakis
Date:   Sat Apr 19 00:57:23 2014 +0300
https://developer.blender.org/rB3e3000dade7ea336e23c68f7ce9e83ed78e56f47

Fixes:

* Undo always got image stack undo elements.
* Selection did not set the active index correctly.

===================================================================

M	source/blender/editors/sculpt_paint/paint_curve.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index 07fd415..4c66dc3 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -129,7 +129,6 @@ static void paintcurve_undo_begin(bContext *C, wmOperator *op, PaintCurve *pc)
 
 
 	if (lb != NULL) {
-		ListBase *lb = undo_paint_push_get_list(UNDO_PAINT_IMAGE);
 		UndoCurve *uc = MEM_callocN(sizeof(UndoCurve), "Undo_curve");
 
 		lb->first = uc;
@@ -412,7 +411,7 @@ static void paintcurve_point_select(bContext *C, wmOperator *op, const int loc[2
 						(fabs(loc[1] - pcp->bez.vec[1][1]) < PAINT_CURVE_SELECT_THRESHOLD))
 				{
 					pcp->bez.f2 ^= SELECT;
-					pc->active_point = i;
+					pc->active_point = i + 1;
 					break;
 				}
 			}
@@ -421,7 +420,7 @@ static void paintcurve_point_select(bContext *C, wmOperator *op, const int loc[2
 					(fabs(loc[1] - pcp->bez.vec[0][1]) < PAINT_CURVE_SELECT_THRESHOLD))
 			{
 				pcp->bez.f1 ^= SELECT;
-				pc->active_point = i;
+				pc->active_point = i + 1;
 				if (handle)
 					pcp->bez.h1 = HD_ALIGN;
 				break;
@@ -431,7 +430,7 @@ static void paintcurve_point_select(bContext *C, wmOperator *op, const int loc[2
 					(fabs(loc[1] - pcp->bez.vec[2][1]) < PAINT_CURVE_SELECT_THRESHOLD))
 			{
 				pcp->bez.f3 ^= SELECT;
-				pc->active_point = i;
+				pc->active_point = i + 1;
 				if (handle)
 					pcp->bez.h2 = HD_ALIGN;
 				break;




More information about the Bf-blender-cvs mailing list