Skip to content

Commit

Permalink
Merge pull request #1978 from zenustech/improve-abc-curve
Browse files Browse the repository at this point in the history
improve-abc-curve
  • Loading branch information
iaomw authored Aug 8, 2024
2 parents d3e0ae3 + 0d82151 commit 6b80d6d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions projects/Alembic/ReadAlembic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,19 @@ static std::shared_ptr<PrimitiveObject> foundABCCurves(Alembic::AbcGeom::ICurves
offset += count;
}
}
if (auto width = mesh.getWidthsParam()) {
auto widthsamp =
width.getIndexedValue(Alembic::Abc::v12::ISampleSelector((Alembic::AbcCoreAbstract::index_t)sample_index));
int index_size = (int)widthsamp.getIndices()->size();
if (prim->verts.size() == index_size) {
auto &width_attr = prim->add_attr<float>("width");
for (auto i = 0; i < prim->verts.size(); i++) {
auto index = widthsamp.getIndices()->operator[](i);
auto value = widthsamp.getVals()->operator[](index);
width_attr[i] = value;
}
}
}
ICompoundProperty arbattrs = mesh.getArbGeomParams();
read_attributes2(prim, arbattrs, iSS, read_done);
ICompoundProperty usrData = mesh.getUserProperties();
Expand Down

0 comments on commit 6b80d6d

Please sign in to comment.