AlembicXformWriter.kl

Types

AlembicXformWriter (object)

The AlembicXformWriter specializes the AlembicObjectWriter interface for writing AlembicOXform data. It can be created using the AlembicArchiveWriter.addXform methods.

/*
** Example: AlembicXformWriter
*/

require AlembicWrapper;
require FileIO;

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

  AlembicArchiveWriter archive(path.string());

  Float64 times[];
  times.push(0.0);
  times.push(1.0);
  times.push(2.0);

  Integer ts = archive.addTimeSampling(times);
  
  AlembicXformWriter transform = archive.addXform('/xfo', ts);

  Xfo xfo;

  xfo.tr = Vec3(1.0, 0.0, 0.0);
  transform.writeSample(xfo.toMat44());

  xfo.tr = Vec3(2.0, 0.0, 0.0);
  transform.writeSample(xfo.toMat44());

  xfo.tr = Vec3(3.0, 0.0, 0.0);
  transform.writeSample(xfo.toMat44());

  archive.reset();

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

/*
** Output:

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

*/

Methods

  AlembicXformWriter ( in AlembicXformWriter other )
  AlembicXformWriter ()
AlembicXformWriter clone ? ()
AlembicOObject getOObject ? ()
String getPath ? ()
  reset ! ()
Boolean valid ? ()
Boolean writeSample ! ( in Mat44 mat )
Boolean writeSample ! ( in Mat44 mat, in Box3 childBounds )
Boolean writeSample ! ( in Xfo xfo )