Cleanup: Use correct blenkernel namespace for mesh functions
This commit is contained in:
parent
6c4210b97b
commit
a481eb5576
|
@ -336,7 +336,7 @@ int *BKE_mesh_calc_smoothgroups(const struct MEdge *medge,
|
|||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace blender::mesh_topology {
|
||||
namespace blender::bke::mesh_topology {
|
||||
|
||||
Array<int> build_loop_to_poly_map(Span<MPoly> polys, int loops_num);
|
||||
|
||||
|
@ -348,5 +348,5 @@ inline int previous_poly_loop(const MPoly &poly, int loop_i)
|
|||
return loop_i - 1 + (loop_i == poly.loopstart) * poly.totloop;
|
||||
}
|
||||
|
||||
} // namespace blender::mesh_topology
|
||||
} // namespace blender::bke::mesh_topology
|
||||
#endif
|
||||
|
|
|
@ -221,7 +221,7 @@ class MeshFairingContext : public FairingContext {
|
|||
}
|
||||
}
|
||||
|
||||
loop_to_poly_map_ = blender::mesh_topology::build_loop_to_poly_map(mpoly_, mloop_.size());
|
||||
loop_to_poly_map_ = blender::bke::mesh_topology::build_loop_to_poly_map(mpoly_, mloop_.size());
|
||||
}
|
||||
|
||||
~MeshFairingContext() override
|
||||
|
|
|
@ -553,7 +553,7 @@ void BKE_mesh_origindex_map_create_looptri(MeshElemMap **r_map,
|
|||
*r_mem = indices;
|
||||
}
|
||||
|
||||
namespace blender::mesh_topology {
|
||||
namespace blender::bke::mesh_topology {
|
||||
|
||||
Array<int> build_loop_to_poly_map(const Span<MPoly> polys, const int loops_num)
|
||||
{
|
||||
|
@ -586,7 +586,7 @@ Array<Vector<int>> build_vert_to_loop_map(const Span<MLoop> loops, const int ver
|
|||
return map;
|
||||
}
|
||||
|
||||
} // namespace blender::mesh_topology
|
||||
} // namespace blender::bke::mesh_topology
|
||||
|
||||
/** \} */
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ class CornersOfVertInput final : public bke::MeshFieldInput {
|
|||
{
|
||||
const IndexRange vert_range(mesh.totvert);
|
||||
const Span<MLoop> loops = mesh.loops();
|
||||
Array<Vector<int>> vert_to_loop_map = mesh_topology::build_vert_to_loop_map(loops,
|
||||
mesh.totvert);
|
||||
Array<Vector<int>> vert_to_loop_map = bke::mesh_topology::build_vert_to_loop_map(loops,
|
||||
mesh.totvert);
|
||||
|
||||
const bke::MeshFieldContext context{mesh, domain};
|
||||
fn::FieldEvaluator evaluator{context, &mask};
|
||||
|
|
|
@ -77,13 +77,13 @@ class CornerPreviousEdgeFieldInput final : public bke::MeshFieldInput {
|
|||
}
|
||||
const Span<MPoly> polys = mesh.polys();
|
||||
const Span<MLoop> loops = mesh.loops();
|
||||
Array<int> loop_to_poly_map = mesh_topology::build_loop_to_poly_map(polys, mesh.totloop);
|
||||
Array<int> loop_to_poly_map = bke::mesh_topology::build_loop_to_poly_map(polys, mesh.totloop);
|
||||
return VArray<int>::ForFunc(
|
||||
mesh.totloop,
|
||||
[polys, loops, loop_to_poly_map = std::move(loop_to_poly_map)](const int corner_i) {
|
||||
const int poly_i = loop_to_poly_map[corner_i];
|
||||
const MPoly &poly = polys[poly_i];
|
||||
const int corner_i_prev = mesh_topology::previous_poly_loop(poly, corner_i);
|
||||
const int corner_i_prev = bke::mesh_topology::previous_poly_loop(poly, corner_i);
|
||||
return loops[corner_i_prev].e;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ class EdgesOfVertInput final : public bke::MeshFieldInput {
|
|||
{
|
||||
const IndexRange vert_range(mesh.totvert);
|
||||
const Span<MEdge> edges = mesh.edges();
|
||||
Array<Vector<int>> vert_to_edge_map = mesh_topology::build_vert_to_edge_map(edges,
|
||||
mesh.totvert);
|
||||
Array<Vector<int>> vert_to_edge_map = bke::mesh_topology::build_vert_to_edge_map(edges,
|
||||
mesh.totvert);
|
||||
|
||||
const bke::MeshFieldContext context{mesh, domain};
|
||||
fn::FieldEvaluator evaluator{context, &mask};
|
||||
|
|
|
@ -36,7 +36,7 @@ class CornerFaceIndexInput final : public bke::MeshFieldInput {
|
|||
return {};
|
||||
}
|
||||
return VArray<int>::ForContainer(
|
||||
mesh_topology::build_loop_to_poly_map(mesh.polys(), mesh.totloop));
|
||||
bke::mesh_topology::build_loop_to_poly_map(mesh.polys(), mesh.totloop));
|
||||
}
|
||||
|
||||
uint64_t hash() const final
|
||||
|
@ -65,7 +65,7 @@ class CornerIndexInFaceInput final : public bke::MeshFieldInput {
|
|||
return {};
|
||||
}
|
||||
const Span<MPoly> polys = mesh.polys();
|
||||
Array<int> loop_to_poly_map = mesh_topology::build_loop_to_poly_map(polys, mesh.totloop);
|
||||
Array<int> loop_to_poly_map = bke::mesh_topology::build_loop_to_poly_map(polys, mesh.totloop);
|
||||
return VArray<int>::ForFunc(
|
||||
mesh.totloop, [polys, loop_to_poly_map = std::move(loop_to_poly_map)](const int corner_i) {
|
||||
const int poly_i = loop_to_poly_map[corner_i];
|
||||
|
|
|
@ -52,7 +52,7 @@ class OffsetCornerInFaceFieldInput final : public bke::MeshFieldInput {
|
|||
const VArray<int> corner_indices = evaluator.get_evaluated<int>(0);
|
||||
const VArray<int> offsets = evaluator.get_evaluated<int>(1);
|
||||
|
||||
Array<int> loop_to_poly_map = mesh_topology::build_loop_to_poly_map(polys, mesh.totloop);
|
||||
Array<int> loop_to_poly_map = bke::mesh_topology::build_loop_to_poly_map(polys, mesh.totloop);
|
||||
|
||||
Array<int> offset_corners(mask.min_array_size());
|
||||
threading::parallel_for(mask.index_range(), 2048, [&](const IndexRange range) {
|
||||
|
|
|
@ -290,8 +290,8 @@ class TextureMarginMap {
|
|||
|
||||
void build_tables()
|
||||
{
|
||||
loop_to_poly_map_ = blender::mesh_topology::build_loop_to_poly_map({mpoly_, totpoly_},
|
||||
totloop_);
|
||||
loop_to_poly_map_ = blender::bke::mesh_topology::build_loop_to_poly_map({mpoly_, totpoly_},
|
||||
totloop_);
|
||||
|
||||
loop_adjacency_map_.resize(totloop_, -1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue