Cleanup, fixes
This commit is contained in:
parent
b18f6083e3
commit
44be9469b0
|
@ -1394,10 +1394,6 @@ static void loop_split_generator(TaskPool *pool, LoopSplitTaskDataCommon *common
|
|||
data_buff = (LoopSplitTaskData *)MEM_calloc_arrayN(
|
||||
LOOP_SPLIT_TASK_BLOCK_SIZE, sizeof(*data_buff), __func__);
|
||||
}
|
||||
for (const int i : blender::IndexRange(LOOP_SPLIT_TASK_BLOCK_SIZE)) {
|
||||
/* Used to tag the end of the buffer. */
|
||||
data_buff[i].ml_curr_index = -1;
|
||||
}
|
||||
data = &data_buff[data_idx];
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1459,12 +1459,14 @@ void ED_mesh_split_faces(Mesh *mesh)
|
|||
using namespace blender;
|
||||
Array<MEdge> edges(mesh->edges());
|
||||
const Span<MPoly> polys = mesh->polys();
|
||||
const Span<MLoop> loops = mesh->loops();
|
||||
const Span<int> corner_verts = mesh->corner_verts();
|
||||
const Span<int> corner_edges = mesh->corner_edges();
|
||||
const float split_angle = (mesh->flag & ME_AUTOSMOOTH) != 0 ? mesh->smoothresh : float(M_PI);
|
||||
BKE_edges_sharp_from_angle_set(edges.data(),
|
||||
edges.size(),
|
||||
loops.data(),
|
||||
loops.size(),
|
||||
corner_verts.data(),
|
||||
corner_edges.data(),
|
||||
corner_verts.size(),
|
||||
polys.data(),
|
||||
BKE_mesh_poly_normals_ensure(mesh),
|
||||
polys.size(),
|
||||
|
@ -1474,8 +1476,8 @@ void ED_mesh_split_faces(Mesh *mesh)
|
|||
for (const int poly_i : range) {
|
||||
const MPoly &poly = polys[poly_i];
|
||||
if (!(poly.flag & ME_SMOOTH)) {
|
||||
for (const MLoop &loop : loops.slice(poly.loopstart, poly.totloop)) {
|
||||
edges[loop.e].flag |= ME_SHARP;
|
||||
for (const int edge_i : corner_edges.slice(poly.loopstart, poly.totloop)) {
|
||||
edges[edge_i].flag |= ME_SHARP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4134,7 +4134,7 @@ static void fill_mesh_face_or_corner_attribute(Mesh &mesh,
|
|||
|
||||
int j = 0;
|
||||
do {
|
||||
const vidx = corner_verts[poly.loopstart + j];
|
||||
const int vidx = corner_verts[poly.loopstart + j];
|
||||
|
||||
if (!(use_vert_sel && !(select_vert[vidx]))) {
|
||||
if (domain == ATTR_DOMAIN_CORNER) {
|
||||
|
|
|
@ -353,7 +353,7 @@ static void split_edge_per_poly(const int edge_i,
|
|||
edge_to_loop_map[edge_i].resize(1);
|
||||
}
|
||||
|
||||
static void mesh_edge_split(Mesh &mesh, const IndexMask mask)
|
||||
void split_edges(Mesh &mesh, const IndexMask mask)
|
||||
{
|
||||
/* Flag vertices that need to be split. */
|
||||
Array<bool> should_split_vert(mesh.totvert, false);
|
||||
|
|
Loading…
Reference in New Issue