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
This commit is contained in:
@@ -441,7 +441,12 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user