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 ) |
Methods in detail¶
AlembicPointsWriter ( in AlembicPointsWriter other )
copy constructor
default constructor
AlembicPointsWriter.addParamWriter! ( in GeometryAttribute attribute, in AlembicGeometryScope scope, in SInt32 timeSampling )
Store a new AlembicGeometryParamReader based on an existing attribute
AlembicPointsWriter AlembicPointsWriter.clone? ()
clone method
Ref<AlembicGeometryAttributesWriter> AlembicPointsWriter.getGeometryAttributesWriter? ()
provide access to the wrapped AlembicGeometryAttributesWriter.
AlembicOObject AlembicPointsWriter.getOObject? ()
returns the wrapped AlembicOObject
String AlembicPointsWriter.getPath? ()
returns the full path of the wrapped AlembicOPoints
AlembicPointsWriter.reset! ()
clears all pointers and releases all alembic containers
Boolean AlembicPointsWriter.valid? ()
returns true if this writer wraps a valid AlembicOPoints
Boolean AlembicPointsWriter.writeSample! ( in Ref<GeometryAttributes> points )
writes a single sample into the file based on the provided GeometryAttributes.
Boolean AlembicPointsWriter.writeSamplePoints! ( in Ref<Points> points )
writes a single sample into the file based on the provided GeometryAttributes.