AlembicPolyMeshWriter.kl

Types

AlembicPolyMeshWriter (object)

The AlembicPolyMeshWriter specializes the AlembicObjectWriter interface for writing AlembicOPolyMesh data. It can be created using the AlembicArchiveWriter.addPolyMesh methods.

/*
** Example: AlembicPolyMeshWriter
*/

require AlembicWrapper;
require FileIO;

operator entry() {
  
  FilePath path = FilePath('${TEMP}/polymesh.abc').expandEnvVars();

  AlembicArchiveWriter archive(path.string());
  AlembicXformWriter xfo = archive.addXform('/xfo', Alembic_kConstantTimeSampling);
  AlembicPolyMeshWriter polyMesh = archive.addPolyMesh('/xfo/polyMesh', Alembic_kConstantTimeSampling);

  xfo.writeSample(Mat44());

  PolygonMesh mesh = PolygonMesh();
  mesh.addSphere(Xfo(), 3.0, 12, true, true);

  polyMesh.writeSample(mesh);

  archive.reset();

  report(path.exists());
  report('Alembic file created: '+path.string());
}

/*
** Output:

true
Alembic file created: R:\Temp/polymesh.abc

*/

Methods

  AlembicPolyMeshWriter ( in AlembicPolyMeshWriter other )
  AlembicPolyMeshWriter ()
  addParamWriter ! ( in GeometryAttribute attribute, in AlembicGeometryScope scope, in SInt32 timeSampling )
AlembicPolyMeshWriter clone ? ()
Ref<AlembicGeometryAttributesWriter> getGeometryAttributesWriter ? ()
AlembicOObject getOObject ? ()
String getPath ? ()
  reset ! ()
Boolean valid ? ()
Boolean writeSample ! ( in Ref<PolygonMesh> mesh )