A community-maintained Python framework for creating mathematical animations.
fix: now support -o flag
leotrsdd3b78006137
diff --git a/manim/config.py b/manim/config.pyindex b1fc11d6a..d05c27f24 100644--- a/manim/config.py+++ b/manim/config.py@@ -105,6 +105,7 @@ def _parse_file_writer_config(config_parser, args):config['input_file'] = args.fileconfig['scene_names'] = (args.scene_namesif args.scene_names is not None else [])+ config['output_file'] = args.output_file# Read some options that cannot be overriden by CLI argumentsfor opt in ['gif_file_extension']:diff --git a/manim/scene/scene_file_writer.py b/manim/scene/scene_file_writer.pyindex 064e21dfd..1d67995d3 100644--- a/manim/scene/scene_file_writer.py+++ b/manim/scene/scene_file_writer.py@@ -106,16 +106,18 @@ class SceneFileWriter(object):def get_default_scene_name(self):"""This method returns the default scene name- which is the value of "file_name", if it exists and+ which is the value of "output_file", if it exists andthe actual name of the class that inherited from- Scene in your animation script, if "file_name" is None.+ Scene in your animation script, if "output_file" is None.Returns-------strThe default scene name."""- return self.scene.__class__.__name__+ return (file_writer_config['output_file']+ if file_writer_config['output_file'] is not None+ else self.scene.__class__.__name__)def get_resolution_directory(self):"""