|
1 | 1 | export script_name = "Timing Assistant" |
2 | 2 | export script_description = "A second brain for timers." |
3 | | -export script_version = "2.0.0" |
| 3 | +export script_version = "2.0.1" |
4 | 4 | export script_author = "PhosCity" |
5 | 5 | export script_namespace = "phos.TimingAssistant" |
6 | 6 |
|
@@ -221,22 +221,10 @@ timeStart = (sub, sel, opt) -> |
221 | 221 | -- Line Linking |
222 | 222 | if endTimePrevious and math.abs(endTimePrevious - startTime) < opt.startLink and not isKeyframe(endTimePrevious) |
223 | 223 | previousKeyframe, nextKeyframe = findAdjacentKeyframes endTimePrevious |
224 | | - keyframePlus500ms = getTime(previousKeyframe) + 500 |
225 | 224 |
|
226 | | - if startTime < endTimePrevious and endTimePrevious < keyframePlus500ms |
227 | | - line.start_time = startTime - opt.startLeadIn unless snap |
228 | | - previousLine.end_time = getTime previousKeyframe |
229 | | - debugMsg opt, "Link lines failed because a keyframe is close. Snap end of last line. Add lead in to current line." |
230 | | - |
231 | | - elseif (startTime - opt.startLeadIn) > (getTime(nextKeyframe) - 500) |
232 | | - line.start_time = getTime(nextKeyframe) - 500 unless snap |
233 | | - previousLine.end_time = line.start_time - opt.gap |
234 | | - debugMsg opt, "Link lines by ensuring that start time is 500 ms away from next keyframe." |
235 | | - |
236 | | - else |
237 | | - line.start_time = startTime - math.min(opt.startLeadIn, startTime - keyframePlus500ms) unless snap |
238 | | - previousLine.end_time = line.start_time - opt.gap |
239 | | - debugMsg opt, "Link lines by adding appropriate lead in to current line." |
| 225 | + line.start_time = startTime - opt.startLeadIn unless snap |
| 226 | + previousLine.end_time = line.start_time - opt.gap |
| 227 | + debugMsg opt, "Link lines by adding appropriate lead in to current line." |
240 | 228 |
|
241 | 229 | sub[i - j] = previousLine |
242 | 230 | link = true |
@@ -275,8 +263,8 @@ timeEnd = (sub, sel, opt) -> |
275 | 263 | if opt.endKeysnapAfter >= 850 and nextKfDistance >= 850 and nextKfDistance <= opt.endKeysnapAfter and previousKfDistance > opt.endKeysnapBefore |
276 | 264 | cps = calculateCPS(line) |
277 | 265 | if cps <= 15 |
278 | | - line.end_time = endTime + math.min(opt.endLeadOut, nextKfDistance - 500) |
279 | | - debugMsg opt, "cps is less than 15.\nAdjusting end time so that it's 500 ms away from keyframe or adding lead out whichever is lesser." |
| 266 | + line.end_time = endTime + opt.endLeadOut |
| 267 | + debugMsg opt, "cps is less than 15.\nAdding lead out normally." |
280 | 268 | else |
281 | 269 | line.end_time = getTime nextKeyframe |
282 | 270 | debugMsg opt, "cps is more than 15.\nSnapping to keyframe more than 850 ms away." |
|
0 commit comments