mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-09-13 07:23:15 +08:00
Do not emit empty Curves primitive.
This commit is contained in:
parent
bb3884e04e
commit
036166d121
@ -835,15 +835,17 @@ static void VisitObjectAndExtractNode(Node *node_out, std::stringstream &ss,
|
||||
Alembic::AbcGeom::ICurvesSchema::Sample psample;
|
||||
Alembic::AbcGeom::ICurvesSchema &ps = curve.getSchema();
|
||||
|
||||
std::cout << " # of samples = " << ps.getNumSamples() << std::endl;
|
||||
std::cout << "Curve: # of samples = " << ps.getNumSamples() << std::endl;
|
||||
|
||||
if (ps.getNumSamples() > 0) {
|
||||
Curves *curves = new Curves();
|
||||
ps.get(psample, samplesel);
|
||||
|
||||
const size_t num_curves = psample.getNumCurves();
|
||||
std::cout << " # of curves = " << num_curves << std::endl;
|
||||
|
||||
if (num_curves > 0) {
|
||||
Curves *curves = new Curves();
|
||||
|
||||
Alembic::Abc::P3fArraySamplePtr P = psample.getPositions();
|
||||
Alembic::Abc::FloatArraySamplePtr knots = psample.getKnots();
|
||||
Alembic::Abc::UcharArraySamplePtr orders = psample.getOrders();
|
||||
@ -888,6 +890,7 @@ static void VisitObjectAndExtractNode(Node *node_out, std::stringstream &ss,
|
||||
}
|
||||
|
||||
node = curves;
|
||||
}
|
||||
|
||||
} else {
|
||||
std::cout << "Warning: # of samples = 0" << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user