[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56873] trunk/blender/source/blender/ editors/sculpt_paint/paint_ops.c: Fix #35393: Sculpt Shortcuts are bananas.

Sergey Sharybin sergey.vfx at gmail.com
Fri May 17 13:08:50 CEST 2013


Revision: 56873
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56873
Author:   nazgul
Date:     2013-05-17 11:08:50 +0000 (Fri, 17 May 2013)
Log Message:
-----------
Fix #35393: Sculpt Shortcuts are bananas.

Issue was introduced by self in svn rev56815.
Brushes list was simply not fully traversing
due to mistake in termination condition.

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56815

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c	2013-05-17 09:47:05 UTC (rev 56872)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c	2013-05-17 11:08:50 UTC (rev 56873)
@@ -271,17 +271,17 @@
 	}
 
 	/* get the next brush with the active tool */
-	for (brush = first_brush;
-	     brush != brush_orig;
-	     brush = brush->id.next ? brush->id.next : bmain->brush.first)
-	{
+	brush = first_brush;
+	do {
 		if ((brush->ob_mode & ob_mode) &&
 		    (brush_tool(brush, tool_offset) == tool))
 		{
 			return brush;
 		}
-	}
 
+		brush = brush->id.next ? brush->id.next : bmain->brush.first;
+	} while (brush != first_brush);
+
 	return NULL;
 }
 




More information about the Bf-blender-cvs mailing list