cuts_path is full path to json file, typos
This commit is contained in:
parent
2bb2cb687e
commit
dcd68133af
1 changed files with 9 additions and 9 deletions
|
@ -2,7 +2,7 @@
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
# GPL 2008-2012
|
# GPL 2008-2012
|
||||||
|
|
||||||
from __future__ import division
|
from __future__ import division, with_statement
|
||||||
|
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import Image
|
import Image
|
||||||
|
@ -321,11 +321,12 @@ class Timelines():
|
||||||
#remove tiles that might exist from previous run
|
#remove tiles that might exist from previous run
|
||||||
if not self.points:
|
if not self.points:
|
||||||
for mode in self.modes:
|
for mode in self.modes:
|
||||||
tiles = glob('%s/timeline%s*%d*.jpg' % (self.tile_path, mode, self.large_tile_h))
|
type = 'png' if mode == 'data' else 'jpg'
|
||||||
|
tiles = glob('%s/timeline%s*%d*.%s' % (self.tile_path, mode, self.large_tile_h, type))
|
||||||
for f in ox.sorted_strings(tiles)[self.large_tile_i+2:]:
|
for f in ox.sorted_strings(tiles)[self.large_tile_i+2:]:
|
||||||
os.unlink(f)
|
os.unlink(f)
|
||||||
if self.render_small_tiles:
|
if self.render_small_tiles:
|
||||||
tiles = glob('%s/timeline%s*%d*.jpg' % (self.tile_path, mode, self.small_tile_h))
|
tiles = glob('%s/timeline%s*%d*.%s' % (self.tile_path, mode, self.small_tile_h, type))
|
||||||
for f in ox.sorted_strings(tiles)[self.small_tile_i+2:]:
|
for f in ox.sorted_strings(tiles)[self.small_tile_i+2:]:
|
||||||
os.unlink(f)
|
os.unlink(f)
|
||||||
|
|
||||||
|
@ -526,7 +527,7 @@ class Timelines():
|
||||||
|
|
||||||
def _open_full_tile(self):
|
def _open_full_tile(self):
|
||||||
if self.large_tile_n == 1:
|
if self.large_tile_n == 1:
|
||||||
self.full_tile_widhts = [self.large_tile_last_w]
|
self.full_tile_widths = [self.large_tile_last_w]
|
||||||
else:
|
else:
|
||||||
full_tile_w = self.full_tile_w
|
full_tile_w = self.full_tile_w
|
||||||
full_tile_n = self.large_tile_n
|
full_tile_n = self.large_tile_n
|
||||||
|
@ -629,11 +630,10 @@ class Timelines():
|
||||||
if self.cuts_path:
|
if self.cuts_path:
|
||||||
# remove cuts at max_cut_len
|
# remove 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 self.no_cuts, self.cuts)
|
||||||
f = open(self.cuts_path + 'cuts.json', 'w')
|
with open(self.cuts_path, 'w') as f:
|
||||||
# remove 0 and frame_n from cuts
|
# 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[1:-1])) + ']')
|
||||||
f.close()
|
|
||||||
if self.render_audio:
|
if self.render_audio:
|
||||||
self._render_audio(self.volume)
|
self._render_audio(self.volume)
|
||||||
if self.log:
|
if self.log:
|
||||||
|
|
Loading…
Reference in a new issue