diff options
author | Erik Abrahamsson <erik85> | 2022-07-27 16:38:30 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-07-27 16:38:44 +0300 |
commit | c8ae1fce6024556b72c9e48c2b97c310aceb556c (patch) | |
tree | 31328550a7a4511f23a33a122cc4d671d4681400 /source/blender/geometry/intern/mesh_to_curve_convert.cc | |
parent | 9ac81ed6abfbd431aafd75969f8590703ebe122f (diff) |
Geometry Nodes: Shortest Paths nodes
This adds three new nodes:
* `Shortest Edge Paths`: Actually finds the shortest paths.
* `Edge Paths to Curves`: Converts the paths to separate curves.
This may generate a quadratic amount of data, making it slow
for large meshes.
* `Edge Paths to Selection`: Generates an edge selection that
contains all edges that are part of a path. This can be used
with the Separate Geometry node to only keep the edges that
are part of a path. For large meshes, this approach can be
much faster than the `Edge Paths to Curves` node, because
less data is created.
Differential Revision: https://developer.blender.org/D15274
Diffstat (limited to 'source/blender/geometry/intern/mesh_to_curve_convert.cc')
-rw-r--r-- | source/blender/geometry/intern/mesh_to_curve_convert.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/geometry/intern/mesh_to_curve_convert.cc b/source/blender/geometry/intern/mesh_to_curve_convert.cc index fdacb174462..350dfe73d57 100644 --- a/source/blender/geometry/intern/mesh_to_curve_convert.cc +++ b/source/blender/geometry/intern/mesh_to_curve_convert.cc @@ -30,10 +30,10 @@ static void copy_with_map(const VArray<T> &src, Span<int> map, MutableSpan<T> ds }); } -static bke::CurvesGeometry create_curve_from_vert_indices(const Mesh &mesh, - const Span<int> vert_indices, - const Span<int> curve_offsets, - const IndexRange cyclic_curves) +bke::CurvesGeometry create_curve_from_vert_indices(const Mesh &mesh, + const Span<int> vert_indices, + const Span<int> curve_offsets, + const IndexRange cyclic_curves) { bke::CurvesGeometry curves(vert_indices.size(), curve_offsets.size()); curves.offsets_for_write().drop_back(1).copy_from(curve_offsets); |