Sculpt: Use faster undo push function before transform tools

Use the function introduced in fd205d9bb9. In a test this made
the initialization of the transform operator 1.5x faster for a large mesh.
This commit is contained in:
Hans Goudey
2024-07-09 22:31:49 -04:00
parent d65f6a9d62
commit 9eac6b6786

View File

@@ -131,9 +131,7 @@ void cache_init(bContext *C,
bke::pbvh::update_normals(pbvh, nullptr);
}
for (const int i : ss.filter_cache->nodes.index_range()) {
undo::push_node(ob, ss.filter_cache->nodes[i], undo_type);
}
undo::push_nodes(ob, ss.filter_cache->nodes, undo_type);
/* Setup orientation matrices. */
copy_m4_m4(ss.filter_cache->obmat.ptr(), ob.object_to_world().ptr());