AlembicXformReader.kl

Types

AlembicXformReader (object)

The AlembicXformReader specializes the AlembicObjectReader interface for reading AlembicIXform data. It can be created using the AlembicArchiveReader.getXform method.

/*
** Example: AlembicXformReader
*/

require AlembicWrapper;
require FileIO;

operator entry() {
  
  FilePath path = FilePath('${FABRIC_SCENE_GRAPH_DIR}/Python/Apps/Resources/Alembic/hierarchy.abc').expandEnvVars();

  AlembicArchiveReader archive(path.string());
  String xformPaths[] = archive.getPathsOfType('Xform');

  for(Size i=0;i<xformPaths.size();i++) {

    AlembicXformReader xform = archive.getXform(xformPaths[i]);
    report('samples: '+xform.getNumSamples());

    Xfo m = xform.readSample(2.4);
    report(m.tr);

  }

}

/*
** Output:

samples: 100
{x:+0.758976,y:+0.0,z:+2.390652}
samples: 100
{x:-0.758976,y:+0.0,z:-2.390652}
samples: 100
{x:+0.758976,y:+0.0,z:+2.390652}
samples: 100
{x:+7.29038,y:+0.0,z:-3.518709}
samples: 100
{x:-5.112164,y:+0.0,z:+5.5977}
samples: 100
{x:-7.401941,y:+0.0,z:-10.38721}

*/

Methods

  AlembicXformReader ( in AlembicXformReader other )
  AlembicXformReader ()
Boolean areSelfBoundsConstant ? ()
AlembicXformReader clone ? ()
Box3 getBounds ! ( in Float64 time, io Boolean isConstant )
Box3 getChildBounds ! ( in Float64 time )
SInt32 getNumSamples ? ()
String getPath ? ()
AlembicXformSample getSample ? ()
AlembicIXformSchema getSchema ? ()
Float64[] getTimes ? ()
Float64[] getTimesFromHierarchy ! ()
Xfo readSample ! ( in Float64 time )
Xfo readSampleGlobal ! ( in Float64 time )
Xfo[] readSamples ! ( in Float64 times[] )
Xfo[] readSamplesGlobal ! ( in Float64 times[] )
  reset ! ()
Boolean valid ? ()