Skip to content

Commit 3b2eea8

Browse files
committed
fix
1 parent 1fb3903 commit 3b2eea8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lib.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,19 @@ def get_key_frames(data: str, tuneX: int = 0, tuneY: int = 0) -> (List[KeyFrame]
5454
ysize: int = 0
5555

5656
for i in data.split(";"):
57-
key, tdata = i.split("~=")
58-
59-
x, y, xs, ys, _ = map(int, tdata.split(" "))
57+
if '~=' in i:
58+
key, tdata = i.split("~=")
59+
else:
60+
key, tdata = i.split("=")
61+
62+
_tmp:List[int] = list(map(int, tdata.split(" ")))
63+
64+
x = _tmp[0]
65+
y = _tmp[1]
66+
xs = _tmp[2]
67+
ys = _tmp[3]
68+
69+
del _tmp
6070

6171
if xsize == 0:
6272
xsize = xs + abs(tuneX)

0 commit comments

Comments
 (0)