Cleanup: Sculpt: Use const pointers for orig vert data
This commit is contained in:
@@ -1206,16 +1206,15 @@ enum StrokeFlags {
|
||||
};
|
||||
|
||||
void SCULPT_orig_vert_data_unode_init(SculptOrigVertData &data,
|
||||
Object &ob,
|
||||
blender::ed::sculpt_paint::undo::Node &unode)
|
||||
const Object &ob,
|
||||
const blender::ed::sculpt_paint::undo::Node &unode)
|
||||
{
|
||||
SculptSession *ss = ob.sculpt;
|
||||
BMesh *bm = ss->bm;
|
||||
const SculptSession *ss = ob.sculpt;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
data.unode = &unode;
|
||||
|
||||
if (bm) {
|
||||
if (ss->bm) {
|
||||
data.bm_log = ss->bm_log;
|
||||
}
|
||||
else {
|
||||
@@ -1228,8 +1227,8 @@ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData &data,
|
||||
|
||||
void SCULPT_orig_vert_data_init(SculptOrigVertData &data,
|
||||
Object &ob,
|
||||
PBVHNode &node,
|
||||
blender::ed::sculpt_paint::undo::Type type)
|
||||
const PBVHNode &node,
|
||||
const blender::ed::sculpt_paint::undo::Type type)
|
||||
{
|
||||
using namespace blender::ed::sculpt_paint;
|
||||
undo::Node *unode = undo::push_node(ob, &node, type);
|
||||
|
||||
@@ -589,7 +589,7 @@ float factor_get(const Cache *automasking,
|
||||
return automasking_factor_end(ss, automasking, vert, mask);
|
||||
}
|
||||
|
||||
NodeData node_begin(Object &object, const Cache *automasking, PBVHNode &node)
|
||||
NodeData node_begin(Object &object, const Cache *automasking, const PBVHNode &node)
|
||||
{
|
||||
if (!automasking) {
|
||||
return {};
|
||||
|
||||
@@ -102,7 +102,7 @@ struct SculptVertexNeighborIter {
|
||||
struct SculptOrigVertData {
|
||||
BMLog *bm_log;
|
||||
|
||||
blender::ed::sculpt_paint::undo::Node *unode;
|
||||
const blender::ed::sculpt_paint::undo::Node *unode;
|
||||
const blender::float3 *coords;
|
||||
const blender::float3 *normals;
|
||||
const float *vmasks;
|
||||
@@ -991,7 +991,7 @@ Array<int> duplicate_face_sets(const Mesh &mesh);
|
||||
*/
|
||||
void SCULPT_orig_vert_data_init(SculptOrigVertData &data,
|
||||
Object &ob,
|
||||
PBVHNode &node,
|
||||
const PBVHNode &node,
|
||||
blender::ed::sculpt_paint::undo::Type type);
|
||||
/**
|
||||
* Update a #SculptOrigVertData for a particular vertex from the PBVH iterator.
|
||||
@@ -1002,8 +1002,8 @@ void SCULPT_orig_vert_data_update(SculptOrigVertData &orig_data, const PBVHVerte
|
||||
* handles #BMesh, #Mesh, and multi-resolution.
|
||||
*/
|
||||
void SCULPT_orig_vert_data_unode_init(SculptOrigVertData &data,
|
||||
Object &ob,
|
||||
blender::ed::sculpt_paint::undo::Node &unode);
|
||||
const Object &ob,
|
||||
const blender::ed::sculpt_paint::undo::Node &unode);
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
@@ -1306,9 +1306,8 @@ struct NodeData {
|
||||
|
||||
/**
|
||||
* Call before PBVH vertex iteration.
|
||||
* \param automask_data: pointer to an uninitialized #auto_mask::NodeData struct.
|
||||
*/
|
||||
NodeData node_begin(Object &object, const Cache *automasking, PBVHNode &node);
|
||||
NodeData node_begin(Object &object, const Cache *automasking, const PBVHNode &node);
|
||||
|
||||
/* Call before factor_get and SCULPT_brush_strength_factor. */
|
||||
void node_update(NodeData &automask_data, PBVHVertexIter &vd);
|
||||
|
||||
Reference in New Issue
Block a user