AlembicPolyMeshReader (object)

The AlembicPolyMeshReader specializes the AlembicObjectReader interface for reading AlembicIPolyMesh data. It can be created using the AlembicArchiveReader.getPolyMesh method.

AlembicPolyMeshReader AlembicPolyMeshReader AlembicPolyMeshReader AlembicBaseObjectReader AlembicBaseObjectReader AlembicPolyMeshReader->AlembicBaseObjectReader AlembicGeometryReader AlembicGeometryReader AlembicPolyMeshReader->AlembicGeometryReader AlembicObjectReader AlembicObjectReader AlembicBaseObjectReader->AlembicObjectReader

/*
** Example: AlembicPolyMeshReader
*/

require AlembicWrapper;
require FileIO;

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

  AlembicArchiveReader archive(path.string());
  String polyMeshPaths[] = archive.getPathsOfType('PolyMesh');

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

    AlembicPolyMeshReader polyMesh = archive.getPolyMesh(polyMeshPaths[i]);
    report('samples: '+polyMesh.getNumSamples());

    PolygonMesh mesh = PolygonMesh();
    polyMesh.readSample(2.4, mesh);

    report(mesh.pointCount());
    report(mesh.polygonCount());
  }

}

/*
** Output:

samples: 50
6174
12294

*/

Methods in detail

AlembicPolyMeshReader ( in AlembicPolyMeshReader other )

copy constructor


AlembicPolyMeshReader ()

default constructor


Boolean AlembicPolyMeshReader.areSelfBoundsConstant? ()

Returns true if the bounds of this object, excluding the children, are constant


AlembicPolyMeshReader AlembicPolyMeshReader.clone? ()

clone method


AlembicGeometryAttributesReader AlembicPolyMeshReader.getAlembicGeometryAttributesReader? ()

Returns the AlembicGeometryAttributesReader responsible for parsing the Alembic data into the GeometryAttributes container.


AlembicIPolyMesh AlembicPolyMeshReader.getAlembicIPolyMesh? ()

Returns the AlembicIPolyMesh that owns the alembic data. This is useful if the alembic file contains custom data that must be parsed by client code.


SInt32 AlembicPolyMeshReader.getNumSamples? ()

Returns the number of samples of this reader


String AlembicPolyMeshReader.getPath? ()

Returns the full path of the wrapped AlembicIPolyMesh


AlembicIPolyMeshSample AlembicPolyMeshReader.getSampleA? ()

Returns the first sample used by this reader


AlembicIPolyMeshSample AlembicPolyMeshReader.getSampleB? ()

Returns the second sample used by this reader


AlembicIPolyMeshSchema AlembicPolyMeshReader.getSchema? ()

Returns the schema of this reader


Box3 AlembicPolyMeshReader.getSelfBounds! ( in Float64 time, io Boolean isConstant )

Returns the bounding box


AlembicTimeSampling AlembicPolyMeshReader.getTimeSampling? ()

Returns the timesampling of this reader


AlembicPolyMeshReader.readSample! ( in Float64 time, in Boolean freezeAttributeIndices, io PolygonMesh mesh )

reads a sample at a given time. this will properly interpolate between samples. the result is stored in the provided PolygonMesh. freezeAttributeIndices: maintain Mesh’s attribute sharing layout of the 1st read sample through playback. For example, if new normal or UV splits are introduced during playback, one of the values will be used (arbitrary). The advantage is to gain more speed and to ensure attribute matching (for effects such as motion blur). This options will be ignored if the topology changes.


AlembicPolyMeshReader.readSample! ( in Float64 time, io Geometry geom )

Reads a geometry sample at a given time


AlembicPolyMeshReader.readSample! ( in Float64 time, io PolygonMesh mesh )

reads a sample at a given time. this will properly interpolate between samples. the result is stored in the provided PolygonMesh.


AlembicPolyMeshReader.reset! ()

clears all pointers and releases all alembic containers


Boolean AlembicPolyMeshReader.valid? ()

Returns true if this reader wraps a valid AlembicIPolyMesh