[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54601] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: Fix performance regression with anchor brush in sculpt mode
Nicholas Bishop
nicholasbishop at gmail.com
Sat Feb 16 22:32:05 CET 2013
Revision: 54601
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54601
Author: nicholasbishop
Date: 2013-02-16 21:32:05 +0000 (Sat, 16 Feb 2013)
Log Message:
-----------
Fix performance regression with anchor brush in sculpt mode
When restoring coordinates in sculpt mode (used for several brushes
including anchor brush), can use sculpt_undo_get_node() for
non-dyntopo sculpting instead of sculpt_undo_push_node().
This should bring speed of anchor brush back to 2.65 level for regular
mesh/multires sculpting.
Fixes projects.blender.org/tracker/?func=detail&atid=498&aid=34208&group_id=9
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2013-02-16 21:21:04 UTC (rev 54600)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2013-02-16 21:32:05 UTC (rev 54601)
@@ -441,7 +441,12 @@
SculptUndoType type = (brush->sculpt_tool == SCULPT_TOOL_MASK ?
SCULPT_UNDO_MASK : SCULPT_UNDO_COORDS);
- unode = sculpt_undo_push_node(ob, nodes[n], type);
+ if (ss->bm) {
+ unode = sculpt_undo_push_node(ob, nodes[n], type);
+ }
+ else {
+ unode = sculpt_undo_get_node(nodes[n]);
+ }
if (unode) {
PBVHVertexIter vd;
SculptOrigVertData orig_data;
More information about the Bf-blender-cvs
mailing list