Allow for logging notes in wait calls, useful for presenter mode

This commit is contained in:
Grant Sanderson 2022-01-18 10:04:17 -08:00
parent 8e9b4d8563
commit eab97faf13

View file

@ -485,7 +485,9 @@ class Scene(object):
self.unlock_mobject_data() self.unlock_mobject_data()
@handle_play_like_call @handle_play_like_call
def wait(self, duration=DEFAULT_WAIT_TIME, stop_condition=None): def wait(self, duration=DEFAULT_WAIT_TIME, stop_condition=None, note=None):
if note:
log.info(note)
self.update_mobjects(dt=0) # Any problems with this? self.update_mobjects(dt=0) # Any problems with this?
self.lock_static_mobject_data() self.lock_static_mobject_data()
if self.presenter_mode and not self.skip_animations: if self.presenter_mode and not self.skip_animations: