Cleanup: Sculpt: Resolve todo about const in auto-masking argument
It turns out the undo push is unrelated to this though.
This commit is contained in:
@@ -94,13 +94,8 @@ namespace auto_mask {
|
||||
|
||||
/**
|
||||
* Calculate all auto-masking influence on each vertex.
|
||||
*
|
||||
* \todo Remove call to `undo::push_node` deep inside this function so the `object` argument can be
|
||||
* const. That may (hopefully) require pulling out the undo node push into the code for each brush.
|
||||
* That should help clarify the code path for brushes, and various optimizations will depend on
|
||||
* brush implementations doing their own undo pushes.
|
||||
*/
|
||||
void calc_vert_factors(Object &object,
|
||||
void calc_vert_factors(const Object &object,
|
||||
const Cache &cache,
|
||||
const PBVHNode &node,
|
||||
Span<int> verts,
|
||||
|
||||
@@ -1208,7 +1208,7 @@ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData &data,
|
||||
}
|
||||
|
||||
void SCULPT_orig_vert_data_init(SculptOrigVertData &data,
|
||||
Object &ob,
|
||||
const Object &ob,
|
||||
const PBVHNode &node,
|
||||
const blender::ed::sculpt_paint::undo::Type type)
|
||||
{
|
||||
|
||||
@@ -594,7 +594,7 @@ static void mesh_orig_vert_data_update(SculptOrigVertData &orig_data, const int
|
||||
orig_data.no = orig_data.normals[vert];
|
||||
}
|
||||
|
||||
void calc_vert_factors(Object &object,
|
||||
void calc_vert_factors(const Object &object,
|
||||
const Cache &cache,
|
||||
const PBVHNode &node,
|
||||
const Span<int> verts,
|
||||
@@ -612,7 +612,7 @@ void calc_vert_factors(Object &object,
|
||||
}
|
||||
}
|
||||
|
||||
NodeData node_begin(Object &object, const Cache *automasking, const PBVHNode &node)
|
||||
NodeData node_begin(const Object &object, const Cache *automasking, const PBVHNode &node)
|
||||
{
|
||||
if (!automasking) {
|
||||
return {};
|
||||
|
||||
@@ -1007,7 +1007,7 @@ Set<int> gather_hidden_face_sets(Span<bool> hide_poly, Span<int> face_sets);
|
||||
* handles #BMesh, #Mesh, and multi-resolution.
|
||||
*/
|
||||
void SCULPT_orig_vert_data_init(SculptOrigVertData &data,
|
||||
Object &ob,
|
||||
const Object &ob,
|
||||
const PBVHNode &node,
|
||||
blender::ed::sculpt_paint::undo::Type type);
|
||||
/**
|
||||
@@ -1337,7 +1337,7 @@ struct NodeData {
|
||||
/**
|
||||
* Call before PBVH vertex iteration.
|
||||
*/
|
||||
NodeData node_begin(Object &object, const Cache *automasking, const PBVHNode &node);
|
||||
NodeData node_begin(const Object &object, const Cache *automasking, const PBVHNode &node);
|
||||
|
||||
/* Call before factor_get and SCULPT_brush_strength_factor. */
|
||||
void node_update(NodeData &automask_data, const PBVHVertexIter &vd);
|
||||
|
||||
Reference in New Issue
Block a user