Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Don't add sound while skipping animations

Grant Sandersonf54b2ac81a76
diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.py
index c9ad71878..014ea528e 100644
--- a/manimlib/scene/scene.py
+++ b/manimlib/scene/scene.py
@@ -543,6 +543,8 @@ class Scene(Container):
self.file_writer.write_frame(frame)
def add_sound(self, sound_file, time_offset=0, gain=None, **kwargs):
+ if self.skip_animations:
+ return
time = self.get_time() + time_offset
self.file_writer.add_sound(sound_file, time, gain, **kwargs)