AlembicCurvesWriter (object)

The AlembicCurvesWriter specializes the AlembicObjectWriter interface for writing AlembicOCurves data. It can be created using the AlembicArchiveWriter.addCurves methods.

AlembicCurvesWriter AlembicCurvesWriter AlembicCurvesWriter AlembicObjectWriter AlembicObjectWriter AlembicCurvesWriter->AlembicObjectWriter

/*
** Example: AlembicCurvesWriter
*/

require AlembicWrapper;
require FileIO;

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

  AlembicArchiveWriter archive(path.string());
  AlembicXformWriter xfo = archive.addXform('/xfo', Alembic_kConstantTimeSampling);
  AlembicCurvesWriter curves = archive.addCurves('/xfo/curves', Alembic_kConstantTimeSampling);

  xfo.writeSample(Mat44());

  Lines lines = Lines();
  lines.addPoints( 6 );

  lines.setPosition( 0, Vec3(1,0,0) );
  lines.setPosition( 1, Vec3(-1,0,0) );
  lines.addSegment( 0, 1 );

  lines.setPosition( 2, Vec3(0,1,0) );
  lines.setPosition( 3, Vec3(0,-1,0) );
  lines.addSegment( 2, 3 );

  lines.setPosition( 4, Vec3(0,0,1) );
  lines.setPosition( 5, Vec3(0,0,-1) );
  lines.addSegment( 4, 5 );

  curves.writeSample(lines);

  archive.reset();

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

/*
** Output:

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

*/

Methods

  AlembicCurvesWriter ( in AlembicCurvesWriter other )
  AlembicCurvesWriter ()
  addParamWriter ! ( in GeometryAttribute attribute, in AlembicGeometryScope scope, in SInt32 timeSampling )
AlembicCurvesWriter clone ? ()
Ref<AlembicGeometryAttributesWriter> getGeometryAttributesWriter ? ()
AlembicOObject getOObject ? ()
String getPath ? ()
  reset ! ()
Boolean valid ? ()
Boolean writeSample ! ( in Ref<Curves> geom )
Boolean writeSample ! ( in Ref<Lines> lines )

Methods in detail

AlembicCurvesWriter ( in AlembicCurvesWriter other )

copy constructor


AlembicCurvesWriter ()

default constructor


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

Store a new AlembicGeometryParamReader based on an existing attribute


AlembicCurvesWriter AlembicCurvesWriter.clone? ()

clone method


Ref<AlembicGeometryAttributesWriter> AlembicCurvesWriter.getGeometryAttributesWriter? ()

provide access to the wrapped AlembicGeometryAttributesWriter.


AlembicOObject AlembicCurvesWriter.getOObject? ()

returns the wrapped AlembicOObject


String AlembicCurvesWriter.getPath? ()

returns the full path of the wrapped AlembicOCurves


AlembicCurvesWriter.reset! ()

clears all pointers and releases all alembic containers


Boolean AlembicCurvesWriter.valid? ()

returns true if this writer wraps a valid AlembicOCurves


Boolean AlembicCurvesWriter.writeSample! ( in Ref<Curves> geom )


Boolean AlembicCurvesWriter.writeSample! ( in Ref<Lines> lines )

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