# automatically generated by the FlatBuffers compiler, do not modify

# namespace: FacesoftFlatbuffersSchema

import flatbuffers

class SerializedKeyframesTimeline(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsSerializedKeyframesTimeline(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = SerializedKeyframesTimeline()
        x.Init(buf, n + offset)
        return x

    # SerializedKeyframesTimeline
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # SerializedKeyframesTimeline
    def Version(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos)
        return 0

    # SerializedKeyframesTimeline
    def KeyframesData(self, j):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            a = self._tab.Vector(o)
            return self._tab.Get(flatbuffers.number_types.Float32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4))
        return 0

    # SerializedKeyframesTimeline
    def KeyframesDataAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float32Flags, o)
        return 0

    # SerializedKeyframesTimeline
    def KeyframesDataLength(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.VectorLen(o)
        return 0

    # SerializedKeyframesTimeline
    def SamplesPerFrame(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
        return 0

    # SerializedKeyframesTimeline
    def TimeBetweenFramesSecs(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
        return 0.0

def SerializedKeyframesTimelineStart(builder): builder.StartObject(4)
def SerializedKeyframesTimelineAddVersion(builder, Version): builder.PrependUint16Slot(0, Version, 0)
def SerializedKeyframesTimelineAddKeyframesData(builder, KeyframesData): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(KeyframesData), 0)
def SerializedKeyframesTimelineStartKeyframesDataVector(builder, numElems): return builder.StartVector(4, numElems, 4)
def SerializedKeyframesTimelineAddSamplesPerFrame(builder, SamplesPerFrame): builder.PrependUint32Slot(2, SamplesPerFrame, 0)
def SerializedKeyframesTimelineAddTimeBetweenFramesSecs(builder, TimeBetweenFramesSecs): builder.PrependFloat32Slot(3, TimeBetweenFramesSecs, 0.0)
def SerializedKeyframesTimelineEnd(builder): return builder.EndObject()
