fix a bug where the last cut would be dropped
This commit is contained in:
parent
212f1feaef
commit
ea24ff6e25
1 changed files with 3 additions and 4 deletions
|
@ -662,12 +662,11 @@ class Timelines():
|
||||||
if self.render_antialias:
|
if self.render_antialias:
|
||||||
self._save_full_tile('antialias')
|
self._save_full_tile('antialias')
|
||||||
if self.cuts_path:
|
if self.cuts_path:
|
||||||
# remove cuts at max_cut_len
|
# remove cuts at first frame and last frame and all cuts at max_cut_len
|
||||||
self.cuts = filter(lambda x: x not in self.no_cuts, self.cuts)
|
self.cuts = filter(lambda x: x not in [0, self.frame_n] + self.no_cuts, self.cuts)
|
||||||
with open(self.cuts_path, 'w') as f:
|
with open(self.cuts_path, 'w') as f:
|
||||||
# remove 0 and frame_n from cuts
|
|
||||||
# avoid float rounding artefacts
|
# avoid float rounding artefacts
|
||||||
f.write('[' + ', '.join(map(lambda x: '%.2f' % (x / FPS), self.cuts[1:-1])) + ']')
|
f.write('[' + ', '.join(map(lambda x: '%.2f' % (x / FPS), self.cuts)) + ']')
|
||||||
if self.render_audio:
|
if self.render_audio:
|
||||||
self._render_audio(self.volume)
|
self._render_audio(self.volume)
|
||||||
if not self.render_video:
|
if not self.render_video:
|
||||||
|
|
Loading…
Reference in a new issue