Skip to content

Commit 11834af

Browse files
committed
Add: Arc支持designant
1 parent 61f8fd0 commit 11834af

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/arcfutil/aff/note/arc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
class Arc(Hold):
1717
def __init__(self, time: int, totime: int, fromx: float, tox: float, slideeasing: Union[str, Callable, List[Callable]], fromy: float, toy: float,
18-
color: int, isskyline: bool, skynote: list = None, fx=None):
18+
color: int, isskyline: Union[bool, str], skynote: list = None, fx=None):
1919
super(Arc, self).__init__(time, totime, 1)
2020
self.fromx: float = fromx
2121
self.fromy: float = fromy
2222
self.tox: float = tox
2323
self.toy: float = toy
2424
self.slideeasing: Union[str, Callable, List[Callable]] = slideeasing
2525
self.color: int = color
26-
self.isskyline: bool = isskyline
26+
self.isskyline: Union[bool, str] = isskyline
2727
self.skynote: list = skynote
2828
self.fx: str = fx
2929

@@ -75,7 +75,7 @@ def __str__(self):
7575
'{isskyline})'.format(
7676
time=int(self.time), totime=int(self.totime), fromx=self.fromx, fromy=self.fromy,
7777
slideeasing=self.slideeasing, tox=self.tox, toy=self.toy, color=int(self.color),
78-
fx=self.fx if self.fx else 'none', isskyline='true' if self.isskyline else 'false'
78+
fx=self.fx if self.fx else 'none', isskyline=self.isskyline
7979
)
8080
skynotestr = ''
8181
if self.skynote is not None:

src/arcfutil/aff/parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ def loadline(notestr: str):
7171
elif keyword == 'arc':
7272
if paralist[9] == 'true': # 是否为黑线
7373
isskyline = True
74-
else:
74+
elif paralist[9] == 'false':
7575
isskyline = False
76-
if paralist[9] != 'false':
77-
raise AffNoteValueError
76+
else: # 支持designant, etc.
77+
isskyline = paralist[9]
7878
if sub_expression: # arctap读取
7979
splited = sub_expression.split(',')
8080
skynotetimelist = [arctap[arctap.index('(') + 1:arctap.rindex(')')] for arctap in splited]

0 commit comments

Comments
 (0)