From ca19b5d6798ef3535544b36340cea82a26ba7ff5 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 6 Feb 2020 10:56:51 +0100 Subject: [PATCH] add_text can accept frame_start argument --- pype/scripts/otio_burnin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pype/scripts/otio_burnin.py b/pype/scripts/otio_burnin.py index 85e72245cd..d913baa5e2 100644 --- a/pype/scripts/otio_burnin.py +++ b/pype/scripts/otio_burnin.py @@ -134,17 +134,21 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins): if options_init: self.options_init.update(options_init) - def add_text(self, text, align, options=None): + def add_text(self, text, align, frame_start=None, options=None): """ Adding static text to a filter. :param str text: text to apply to the drawtext :param enum align: alignment, must use provided enum flags + :param int frame_start: starting frame for burnins :param dict options: recommended to use TextOptions """ if not options: options = ffmpeg_burnins.TextOptions(**self.options_init) - self._add_burnin(text, align, options, ffmpeg_burnins.DRAWTEXT) + + options = options.copy() + if frame_start: + options["frame_offset"] = frame_start def add_timecode(self, align, options=None, start_frame=None): """