dont fail if cut_width is 0, fixme: it should never be 0 in the first place
This commit is contained in:
parent
dcd68133af
commit
2ad9961d59
1 changed files with 4 additions and 0 deletions
|
@ -436,6 +436,8 @@ class Timelines():
|
|||
wide = 1 if mode == 'keyframes' else self.wide
|
||||
frame_ratio = self.frame_ratio * wide
|
||||
cut_images = int(math.ceil(cut_width / (frame_ratio * self.large_tile_h)))
|
||||
if cut_width == cut_images == 0:
|
||||
print 'ERROR division by zerro', cut_width, cut_images
|
||||
image_widths = self._divide(cut_width, cut_images)
|
||||
image_i = self.cuts[-2]
|
||||
large_keyframes_tile_i = self.large_keyframes_tile_i
|
||||
|
@ -506,6 +508,8 @@ class Timelines():
|
|||
def _divide(self, num, by):
|
||||
# divide(100, 3) -> [33, 33, 34]
|
||||
arr = []
|
||||
if by == 0:
|
||||
return arr
|
||||
div = int(num / by)
|
||||
mod = num % by
|
||||
for i in range(int(by)):
|
||||
|
|
Loading…
Reference in a new issue