forked from lyzz0612/csb2csd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoolFrame.py
58 lines (48 loc) · 2.04 KB
/
BoolFrame.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: flatbuffers
import flatbuffers
class BoolFrame(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsBoolFrame(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = BoolFrame()
x.Init(buf, n + offset)
return x
# BoolFrame
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# BoolFrame
def FrameIndex(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# BoolFrame
def Tween(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
return True
# BoolFrame
def Value(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
return False
# BoolFrame
def EasingData(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from .EasingData import EasingData
obj = EasingData()
obj.Init(self._tab.Bytes, x)
return obj
return None
def BoolFrameStart(builder): builder.StartObject(4)
def BoolFrameAddFrameIndex(builder, frameIndex): builder.PrependInt32Slot(0, frameIndex, 0)
def BoolFrameAddTween(builder, tween): builder.PrependBoolSlot(1, tween, 1)
def BoolFrameAddValue(builder, value): builder.PrependBoolSlot(2, value, 1)
def BoolFrameAddEasingData(builder, easingData): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(easingData), 0)
def BoolFrameEnd(builder): return builder.EndObject()