AlembicArchiveReader (object)¶
The AlembicArchiveReader is a wrapper for the AlembicIArchive. It provides access to the higher level reader objects such as the AlembicXformReader, for example.
/*
** Example: AlembicArchiveReader
*/
require AlembicWrapper;
require FileIO;
operator entry() {
FilePath path = FilePath("${FABRIC_SCENE_GRAPH_DIR}/Python/Apps/Resources/Alembic/face.abc").expandEnvVars();
AlembicArchiveReader archive(path.string());
report(archive.valid());
report(archive.getPath());
report(archive.getTimeRange());
String meshes[] = archive.getPathsOfType('PolyMesh');
for(Size i=0;i<meshes.size();i++)
report(meshes[i]);
}
/*
** Output:
true
D:\fabric\release/Python/Apps/Resources/Alembic/face.abc
{x:+10.56666,y:+21.33333}
/Mesh_T_Teeth_Pc-Sd1_Xfo/Mesh_T_Teeth_Pc-Sd1_
/Mesh_B_Teeth_Pc-Sd1_Xfo/Mesh_B_Teeth_Pc-Sd1_
/Mesh_X_Head_Pc-Sd1_Xfo/Mesh_X_Head_Pc-Sd1_
/Mesh_L_Eye_Pc-Sd1_Xfo/Mesh_L_Eye_Pc-Sd1_
/Mesh_R_Eye_Pc-Sd1_Xfo/Mesh_R_Eye_Pc-Sd1_
*/
Methods¶
Methods in detail¶
AlembicArchiveReader ( in AlembicArchiveReader other )
copy constructor
AlembicArchiveReader ( in String fileName )
default constructor provided a fileName to a abc file.
default constructor
AlembicArchiveReader AlembicArchiveReader.clone? ()
clone method
AlembicPropertyReader AlembicArchiveReader.createPropertyReader? ( in Ref<AlembicICompoundProperty> parent, in Ref<AlembicPropertyHeader> header )
Helper for creating a property reader based on the header
String[] AlembicArchiveReader.getAllPaths! ()
Returns the full paths of all AlembicIObject entities within the file
AlembicCameraReader AlembicArchiveReader.getCamera! ( in String path )
Returns a AlembicCameraReader wrapper for the AlembicICamera object at a given path
AlembicCurvesReader AlembicArchiveReader.getCurves! ( in String path )
Returns a AlembicCurvesReader wrapper for the AlembicICurves object at a given path
AlembicIObject AlembicArchiveReader.getIObject! ( in String path )
Returns the AlembicIObject of a full path within this file
Ref<AlembicISampleSelector> AlembicArchiveReader.getISampleSelector! ( in UInt32 index )
Reuse the sample selectors to avoid creating KL objects each time
String AlembicArchiveReader.getMetaData! ( in String path, in String key )
Returns the meta data given a path and a key
String[] AlembicArchiveReader.getMetaDataKeys! ( in String path )
Returns all meta data keys given a path
SInt32 AlembicArchiveReader.getNumTimeSamplings? ()
returns the number of AlembicTimeSampling entities within the file
String AlembicArchiveReader.getObjectType! ( in String path )
Returns the type of an AlembicIObject based on its path in the file
String AlembicArchiveReader.getPath? ()
Returns the path of the wrapped archive
String[] AlembicArchiveReader.getPathsOfType! ( in String objType )
Returns the fullpaths of all AlembicIObject entities of a given type
AlembicPointsReader AlembicArchiveReader.getPoints! ( in String path )
Returns a AlembicPointsReader wrapper for the AlembicIPoints object at a given path
AlembicPolyMeshReader AlembicArchiveReader.getPolyMesh! ( in String path )
Returns a AlembicPolyMeshReader wrapper for the AlembicIPolyMesh object at a given path
AlembicPropertyReader AlembicArchiveReader.getProperty! ( in String path, in String key )
Boolean AlembicArchiveReader.getProperty! ( in String path, in String prefix, in String suffix, io AlembicICompoundProperty compound, io AlembicPropertyHeader header )
String[] AlembicArchiveReader.getPropertyKeys! ( in AlembicICompoundProperty compound, in String prefix )
String[] AlembicArchiveReader.getPropertyKeys! ( in String path )
returns all paths to properties within a path to an object
AlembicObjectReader AlembicArchiveReader.getReader! ( in AlembicIObject obj )
Returns the reader object associated with this AlembicIObject
AlembicObjectReader AlembicArchiveReader.getReader! ( in String path )
Returns the reader object associated with this path
AlembicSubDReader AlembicArchiveReader.getSubD! ( in String path )
Returns a AlembicSubDReader wrapper for the AlembicISubD object at a given path
Vec2 AlembicArchiveReader.getTimeRange? ( in Boolean parse )
Returns the time range of this file as a Vec2
parse | Will parse the archive to compute the range (slower), else it will use an heuristic |
Vec2 AlembicArchiveReader.getTimeRange? ()
Returns the time range of this file as a Vec2 Will parse the archive to compute the range (can be slow)
Float64[] AlembicArchiveReader.getTimeSampling? ( in SInt32 timeSampling )
Returns the stored time samples of a given AlembicTimeSampling by index
AlembicXformReader AlembicArchiveReader.getXform! ( in String path )
Returns a AlembicXformReader wrapper for the AlembicIXform object at a given path
Boolean AlembicArchiveReader.isPathAnimated! ( in String path, in Boolean checkXformAnim, in Boolean checkDeformation )
Returns true if a path contains xform or geometry deformation. This function will also recurse to find if parent transforms contains animation or not.
Boolean AlembicArchiveReader.isPathAnimated! ( in String path, in Boolean checkXformAnim, in Boolean checkDeformation, in Boolean recursively )
Returns true if a path contains xform or geometry deformation. Optionally you can set this function to recursively find xform animation.
AlembicArchiveReader.removeReader! ( in String path )
Remove a pointer to a reader from the dictionary Is called when a reader is destroyed
AlembicArchiveReader.reset! ()
Resets all internal pointers, clears all reader objects
AlembicArchiveReader.searchForMaxStoredTimes! ( io UInt32 numSamples, io AlembicTimeSampling timeSampling )
Browse the archive to find the largest time samples (used by demos to set the initial timeline) Note: this is slow as it traverses the whole archive! TODO : use getTimeRangeByParsing() instead
AlembicArchiveReader.setPath! ( in String fileName )
sets the path for this reader
AlembicArchiveReader.setReaders! ( io AlembicBaseObjectReader readers[] )
Boolean AlembicArchiveReader.supportsMultithreadedReads? ()
Returns true if the archive supports multithreaded reads. This is the case only if archive version is > 1.5 (Ogawa)
Boolean AlembicArchiveReader.valid? ()
returns true if the wrapped archive is valid