From 0406557b5cb21b7bbc3ef045f1717716184a48eb Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 19 Jul 2022 12:46:45 -0700 Subject: [PATCH] Make sure CLI resolution updates will work --- manimlib/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manimlib/config.py b/manimlib/config.py index 55a33d87..e5aee984 100644 --- a/manimlib/config.py +++ b/manimlib/config.py @@ -11,6 +11,7 @@ import yaml from manimlib.logger import log from manimlib.utils.config_ops import merge_dicts_recursively from manimlib.utils.init_config import init_customization +from manimlib.constants import FRAME_HEIGHT __config_file__ = "custom_config.yml" @@ -416,7 +417,9 @@ def get_configuration(args): def get_camera_configuration(args, custom_config): camera_config = {} camera_resolutions = get_custom_config()["camera_resolutions"] - if args.low_quality: + if args.resolution: + resolution = args.resolution + elif args.low_quality: resolution = camera_resolutions["low"] elif args.medium_quality: resolution = camera_resolutions["med"] @@ -439,6 +442,9 @@ def get_camera_configuration(args, custom_config): camera_config.update({ "pixel_width": width, "pixel_height": height, + "frame_config": { + "frame_shape": ((width / height) * FRAME_HEIGHT, FRAME_HEIGHT), + }, "fps": fps, })