Skip to content

Commit

Permalink
Make sure CLI resolution updates will work
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Jul 19, 2022
1 parent de7d9ce commit 0406557
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion manimlib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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"
Expand Down Expand Up @@ -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"]
Expand All @@ -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,
})

Expand Down

0 comments on commit 0406557

Please sign in to comment.