AlembicPointsWriter.kl¶
Types¶
AlembicPointsWriter (object)¶
The AlembicPointsWriter specializes the AlembicObjectWriter interface for writing AlembicOPoints data. It can be created using the AlembicArchiveWriter.addPoints methods.
/*
** Example: AlembicPointsWriter
*/
require AlembicWrapper;
require FileIO;
operator entry() {
FilePath path = FilePath('${TEMP}/points.abc').expandEnvVars();
AlembicArchiveWriter archive(path.string());
AlembicXformWriter xfo = archive.addXform('/xfo', Alembic_kConstantTimeSampling);
AlembicPointsWriter points = archive.addPoints('/xfo/points', Alembic_kConstantTimeSampling);
xfo.writeSample(Mat44());
GeometryAttributes attr = GeometryAttributes();
attr.resize(3);
Ref<Vec3Attribute> positions = attr.getOrCreateVec3Attribute('positions');
positions.values[0] = Vec3(1, 1, 1);
positions.values[1] = Vec3(2, 2, 2);
positions.values[2] = Vec3(3, 3, 3);
points.writeSample(attr);
archive.reset();
report(path.exists());
report('Alembic file created: '+path.string());
}
/*
** Output:
true
Alembic file created: R:\Temp/points.abc
*/
Methods¶
AlembicPointsWriter ( in AlembicPointsWriter other ) | |
AlembicPointsWriter () | |
addParamWriter ! ( in GeometryAttribute attribute, in AlembicGeometryScope scope, in SInt32 timeSampling ) | |
AlembicPointsWriter | clone ? () |
Ref<AlembicGeometryAttributesWriter> | getGeometryAttributesWriter ? () |
AlembicOObject | getOObject ? () |
String | getPath ? () |
reset ! () | |
Boolean | valid ? () |
Boolean | writeSample ! ( in Ref<GeometryAttributes> points ) |
Boolean | writeSamplePoints ! ( in Ref<Points> points ) |