From 713ab68fff1db580fd870e16c3b66cf1751637cc Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Fri, 22 May 2020 11:39:12 +0200 Subject: [PATCH 1/4] updated README --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index f7124d52d3..a26816b114 100644 --- a/README.md +++ b/README.md @@ -193,11 +193,6 @@ For users: ```sh manim example_scenes.py SquareToCircle -pl ``` -1. Run the following command: -For developers: -```sh -python3 manim.py example_scenes.py SquareToCircle -pl -``` ![](./readme-assets/command.png) From 29e81721c647ba2620bc74ef41f1102ad1f5ba22 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Fri, 22 May 2020 11:39:28 +0200 Subject: [PATCH 2/4] added dry_run flag --- manim/config.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/manim/config.py b/manim/config.py index 1fb2e11ced..81368b6c20 100644 --- a/manim/config.py +++ b/manim/config.py @@ -23,67 +23,72 @@ def parse_cli(): "-p", "--preview", action="store_true", help="Automatically open the saved file once its done", - ), + ) parser.add_argument( "-w", "--write_to_movie", action="store_true", help="Render the scene as a movie file", - ), + ) parser.add_argument( "-s", "--save_last_frame", action="store_true", help="Save the last frame", - ), + ) + parser.add_argument( + "--dry_run", + action="store_true", + help= "run a dry test", + ) parser.add_argument( "-l", "--low_quality", action="store_true", help="Render at a low quality (for faster rendering)", - ), + ) parser.add_argument( "-m", "--medium_quality", action="store_true", help="Render at a medium quality", - ), + ) parser.add_argument( "--high_quality", action="store_true", help="Render at a high quality", - ), + ) parser.add_argument( "-k", "--four_k", action="store_true", help="Render at a 4K quality", - ), + ) parser.add_argument( "-g", "--save_pngs", action="store_true", help="Save each frame as a png", - ), + ) parser.add_argument( "-i", "--save_as_gif", action="store_true", help="Save the video as gif", - ), + ) parser.add_argument( "-f", "--show_file_in_finder", action="store_true", help="Show the output file in finder", - ), + ) parser.add_argument( "-t", "--transparent", action="store_true", help="Render to a movie file with an alpha channel", - ), + ) parser.add_argument( "-q", "--quiet", action="store_true", help="", - ), + ) parser.add_argument( "-a", "--write_all", action="store_true", help="Write all the scenes from a file", - ), + ) parser.add_argument( "-o", "--file_name", help="Specify the name of the output file, if" @@ -140,8 +145,8 @@ def parse_cli(): def get_configuration(args): file_writer_config = { # By default, write to file - "write_to_movie": args.write_to_movie or not args.save_last_frame, - "save_last_frame": args.save_last_frame, + "write_to_movie": (args.write_to_movie or not args.save_last_frame) and not args.dry_run, + "save_last_frame": args.save_last_frame and not args.dry_run, "save_pngs": args.save_pngs, "save_as_gif": args.save_as_gif, # If -t is passed in (for transparent), this will be RGBA From c93339468cd291b601f08c2fbba04e1e64a345a1 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Fri, 22 May 2020 11:39:47 +0200 Subject: [PATCH 3/4] added a very quick test --- tests/tests_sample_scenes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/tests_sample_scenes.py b/tests/tests_sample_scenes.py index feca458be3..438568822a 100644 --- a/tests/tests_sample_scenes.py +++ b/tests/tests_sample_scenes.py @@ -2,7 +2,11 @@ # This file is intended to test any new feature added. # Feel free to add a test or to modify one when adding a new/changing a feature. - +class Test(Scene): + def construct(self): + square = Square() + self.play(ShowCreation(square)) + class Test_geometry(Scene): def construct(self): circle = Circle() From 44717c8d882988ab573290a56e02bef3c5addbf2 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Fri, 22 May 2020 13:37:57 +0200 Subject: [PATCH 4/4] changed help message --- manim/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manim/config.py b/manim/config.py index 81368b6c20..73e5a90b86 100644 --- a/manim/config.py +++ b/manim/config.py @@ -37,7 +37,7 @@ def parse_cli(): parser.add_argument( "--dry_run", action="store_true", - help= "run a dry test", + help= "Do a dry run (render scenes but generate no output files)", ) parser.add_argument( "-l", "--low_quality",