Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Changed default behavior to have no finishing sound, and instead of passing in --no-sound to prevent the sound, one would pass in --sound to activate it

Grant Sandersond98d1ec61042
diff --git a/manimlib/config.py b/manimlib/config.py
index cdae8d8e6..a5d78f0dc 100644
--- a/manimlib/config.py
+++ b/manimlib/config.py
@@ -41,9 +41,9 @@ def parse_cli():
parser.add_argument("-r", "--resolution")
parser.add_argument("-c", "--color")
parser.add_argument(
- "--no_sound",
+ "--sound",
action="store_true",
- help="Don't play a success/failure sound",
+ help="Play a success/failure sound",
)
module_location.add_argument(
"--livestream",
@@ -128,7 +128,7 @@ def get_configuration(args):
"output_name": output_name,
"start_at_animation_number": args.start_at_animation_number,
"end_at_animation_number": None,
- "no_sound": args.no_sound,
+ "sound": args.sound,
}
# Camera configuration
diff --git a/manimlib/extract_scene.py b/manimlib/extract_scene.py
index d707be4db..6885d8699 100644
--- a/manimlib/extract_scene.py
+++ b/manimlib/extract_scene.py
@@ -136,14 +136,14 @@ def main(config):
for SceneClass in get_scene_classes(scene_names_to_classes, config):
try:
handle_scene(SceneClass(**scene_kwargs), **config)
- if not config["no_sound"]:
+ if config["sound"]:
play_finish_sound()
sys.exit(0)
except Exception:
print("\n\n")
traceback.print_exc()
print("\n\n")
- if not config["no_sound"]:
+ if config["sound"]:
play_error_sound()
sys.exit(2)