alembic.AbcCoreAbstract

The AbcCoreAbstract library is an almost-pure abstract library that describes the interfaces that the storage layer (e.g. AbcCoreHDF5) has to implement for Alembic. The AbcCoreAbstract layer specifies the interface for concepts like Objects or Properties, and the byte-size of data. More on the Alembic concepts like Objects or Properties.

One important piece of Alembic that is defined in this layer is Alembic’s notion of time, in the form of the TimeSampling and TimeSamplingType classes. These are non-abstract classes, and provide a rich interface for working with the temporal component of data samples, and are some of the only classes from this layer that are directly and prominently exposed in higher layers.

AbcCoreAbstract is not intended to be the primary human-friendly data-manipulation library in Alembic; that distinction is held by the Abc library.

class alembic.AbcCoreAbstract.AcyclicFlag
kAcyclic = alembic.AbcCoreAbstract.AcyclicFlag.kAcyclic
names = {'kAcyclic': alembic.AbcCoreAbstract.AcyclicFlag.kAcyclic}
values = {0: alembic.AbcCoreAbstract.AcyclicFlag.kAcyclic}
class alembic.AbcCoreAbstract.DataType

The DataType class is a description of how an element of a sample in a Scalar or an Array property is stored

getExtent((DataType)arg1) → int :

Return the 8-bit extent

getNumBytes((DataType)arg1) → int :

Return the number of bytes occupied by a single datum

getPod((DataType)arg1) → POD :

Return the PlainOldDataType enum

setExtent((DataType)arg1, (int)extent) → None :

Set the 8-bit extent

setPod((DataType)arg1, (POD)plainOldDataType) → None :

Set the PlainOldDataType enum

class alembic.AbcCoreAbstract.MetaData

The MetaData class is an unordered, unique dictionary of strings for describing Protocol for Objects and Interpretation for Properties

append((MetaData)arg1, (MetaData)metaData) → None :

Append the given MetaData. Duplicates are overwritten

appendUnique((MetaData)arg1, (MetaData)metaData) → None :

Append the given MetaData. Duplicate values will cause an exception to be thrown

get((MetaData)arg1, (str)key) → str :

Return the value of the given key or an empty string if it is not set

getRequired((MetaData)arg1, (str)key) → str :

Return the value of the given key and throws an exception if it is not found

getSourceName((MetaData)arg1) → str :

Get the stored source name from the metadata, if any.

matches((MetaData)arg1, (MetaData)metaData) → bool :

Return True if each of the fields in the given MetaData are found in this MetaData and have the same values

matchesExactly((MetaData)arg1, (MetaData)metaData) → bool :

Return True if the given MetaData is exactly equal to this MetaData in every field

matchesOverlap((MetaData)arg1, (MetaData)metaData) → bool :

Return True if, for each of the fields in the given MetaData , this MetaData has either no entry, or the same entry

serialize((MetaData)arg1) → str :

Convert the contents of this MetaData into a single formatted string

set((MetaData)arg1, (str)key, (str)data) → None :

Set a key/data pair (silently ovewrite an existing value)

setIsUV((MetaData)arg1, (bool)arg2) → None :

Set whether or not this metadata stores UVs.

setReference((MetaData)arg1) → None :

Helper function to tag this metadata as being a reference. See isReference() in PropertyHeader for the counterpart.

setSourceName((MetaData)arg1, (str)arg2) → None :

Set a source name, for later retrieval via getSourceName()

setUnique((MetaData)arg1, (str)key, (str)data) → None :

Set a key/data pair (throws an exception in attempt to change the value of an existing field, Setting the same value is fine

size((MetaData)arg1) → int :

Return the size of the dictionary

class alembic.AbcCoreAbstract.ObjectHeader

The ObjectHeader is a collection of MetaData which helps define an Object

getFullName((ObjectHeader)arg1) → str :

Return the full name of the object, which is unique in the whole file

getMetaData((ObjectHeader)arg1) → MetaData :

Return the MetaData of the object

getName((ObjectHeader)arg1) → str :

Return the name of the object, which is unique amongst its siblings

class alembic.AbcCoreAbstract.PropertyHeader

The PropertyHeader is a collection of MetaData which helps define a Property. It also acts as a key of getting an instance of a Property from a CompoundProperty

getDataType((PropertyHeader)arg1) → DataType :

Return the DataType of the property. An exception will be thrown if this is called for a CompoundProperty

getMetaData((PropertyHeader)arg1) → MetaData :

Return the MetaData of the property

getName((PropertyHeader)arg1) → str :

Return the name of the property, which is unique amongst its siblings

isArray((PropertyHeader)arg1) → bool :

Return True if the property is array

isCompound((PropertyHeader)arg1) → bool :

Return True if the property is compound

isReference((PropertyHeader)arg1) → bool :

Return true if the property is tagged as being a reference

isScalar((PropertyHeader)arg1) → bool :

Return True if the property is scalar

isSimple((PropertyHeader)arg1) → bool :

Return True if the property is simple (non-compound)

isUV((PropertyHeader)arg1) → bool :

Return true if the property is tagged as being UVs

class alembic.AbcCoreAbstract.TimeSampling

The TimeSampling class reports information about the time values that are associated with the samples written to a Property

getCeilIndex((TimeSampling)arg1, (float)time, (int)numSamples) → int :

Find the smallest valid index that has a time greater than or equal to the given time

getFloorIndex((TimeSampling)arg1, (float)time, (int)numSamples) → int :

Find the largest valid index that as a time less than or equal to the given time

getNearIndex((TimeSampling)arg1, (float)time, (int)numSamples) → int :

Find the valid index with the closest time to the given time

getNumStoredTimes((TimeSampling)arg1) → int :

Return the number of stored times samples

getSampleTime((TimeSampling)arg1, (int)index) → float :

Return the time of the given sample index

getStoredTimes((TimeSampling)arg1) → TimeVector :

Return the stored times

getTimeSamplingType((TimeSampling)arg1) → TimeSamplingType :

Return the TimeSamplingType of this class

class alembic.AbcCoreAbstract.TimeSamplingType

The TimeSamplingType class controls how properties in Alembic relate time values to their samplig indices

static AcyclicNumSamples() → int :

Return the predefined number of samples per cycle reserved for acyclic sampling type

static AcyclicTimePerCycle() → float :

Return the predefined time per cycle reserved for acyclic sampling type

getNumSamplesPerCycle((TimeSamplingType)arg1) → int :

Return the number of samples per cycle

getTimePerCycle((TimeSamplingType)arg1) → float :

Return the time per cycle

isAcyclic((TimeSamplingType)arg1) → bool :

Return True of the sampling type is acyclic (infinit samples per cycle)

isCyclic((TimeSamplingType)arg1) → bool :

Return True if the sampling type is cyclic (more than 1 samples per cycle)

isUniform((TimeSamplingType)arg1) → bool :

Return True if the sampling type is uniform (1 samples per cycle)

class alembic.AbcCoreAbstract.TimeVector

TimeVector class holds a list of the sampled times

append((TimeVector)arg1, (object)arg2) → None
extend((TimeVector)arg1, (object)arg2) → None