Skip to content

Commit

Permalink
recording: add clip only if information exists
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippKilian committed Jul 3, 2024
1 parent d0cfb66 commit 7387235
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions b3lb/rest/b3lb/make_xges.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,14 @@ def add_slides(self):

# Find the width/height of the slide corresponding to this
# point in time
info = [i.data for i in slide_time.at(pos.start)][0]
width, height = self._constrain(
(info.width, info.height),
(self.slides_width, self.opts.height))

self._add_clip(cursor_layer, dot, pos.start, 0, end - pos.start, round(width*pos.x - dot_width/2), round(height*pos.y - dot_height / 2), dot_width, dot_height)
info_list = [i.data for i in slide_time.at(pos.start)]
if info_list:
info = info_list[0]
width, height = self._constrain(
(info.width, info.height),
(self.slides_width, self.opts.height))

self._add_clip(cursor_layer, dot, pos.start, 0, end - pos.start, round(width*pos.x - dot_width/2), round(height*pos.y - dot_height / 2), dot_width, dot_height)

layer = self._add_layer('Annotations')
# Move above the slides layer
Expand Down

0 comments on commit 7387235

Please sign in to comment.