AlembicPolyMeshWriter (object)

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

AlembicPolyMeshWriter AlembicPolyMeshWriter AlembicPolyMeshWriter AlembicObjectWriter AlembicObjectWriter AlembicPolyMeshWriter->AlembicObjectWriter

/*
** 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 )

Methods in detail

AlembicPolyMeshWriter ( in AlembicPolyMeshWriter other )

copy constructor


AlembicPolyMeshWriter ()

default constructor


AlembicPolyMeshWriter.addParamWriter! ( in GeometryAttribute attribute, in AlembicGeometryScope scope, in SInt32 timeSampling )

Store a new AlembicGeometryParamReader based on an existing attribute


AlembicPolyMeshWriter AlembicPolyMeshWriter.clone? ()

clone method


Ref<AlembicGeometryAttributesWriter> AlembicPolyMeshWriter.getGeometryAttributesWriter? ()

provide access to the wrapped AlembicGeometryAttributesWriter.


AlembicOObject AlembicPolyMeshWriter.getOObject? ()

returns the wrapped AlembicOObject


String AlembicPolyMeshWriter.getPath? ()

returns the full path of the wrapped AlembicOPolyMesh


AlembicPolyMeshWriter.reset! ()

clears all pointers and releases all alembic containers


Boolean AlembicPolyMeshWriter.valid? ()

returns true if this writer wraps a valid AlembicOPolyMesh


Boolean AlembicPolyMeshWriter.writeSample! ( in Ref<PolygonMesh> mesh )

writes a single sample into the file based on the provided PolygonMesh.