diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-03-31 16:01:14 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-03-31 16:01:27 +0300 |
commit | 4c1393c202d41422c16d7ccb04f90a3661525f6e (patch) | |
tree | 8ad4e09ae475fa34440d9ac6f4b5bffeb3bc4d20 /source/blender/io/alembic/exporter | |
parent | eb4155cc1eee8ce1f4b9467bafb721f5f91c3c47 (diff) |
Fix T76746: Alembic, wrong result importing back exported curves
In Alembic curve topology is stored with an array of values describing
how many points each sub-curve has. Instead of writing the number of
points for the current curve, the Alembic exporter would write the
accumulated number of points.
This error has existed since the initial implementation.
Diffstat (limited to 'source/blender/io/alembic/exporter')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_writer_curves.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_curves.cc b/source/blender/io/alembic/exporter/abc_writer_curves.cc index 95f296c2cf7..07bce8fcf7a 100644 --- a/source/blender/io/alembic/exporter/abc_writer_curves.cc +++ b/source/blender/io/alembic/exporter/abc_writer_curves.cc @@ -73,6 +73,7 @@ void ABCCurveWriter::do_write(HierarchyContext &context) Nurb *nurbs = static_cast<Nurb *>(curve->nurb.first); for (; nurbs; nurbs = nurbs->next) { + const size_t current_point_count = verts.size(); if (nurbs->bp) { curve_basis = Alembic::AbcGeom::kNoBasis; curve_type = Alembic::AbcGeom::kVariableOrder; @@ -142,7 +143,7 @@ void ABCCurveWriter::do_write(HierarchyContext &context) } orders.push_back(nurbs->orderu); - vert_counts.push_back(verts.size()); + vert_counts.push_back(verts.size() - current_point_count); } Alembic::AbcGeom::OFloatGeomParam::Sample width_sample; |