mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Make sure CLI resolution updates will work
This commit is contained in:
parent
de7d9ce8c9
commit
0406557b5c
1 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,7 @@ import yaml
|
||||||
from manimlib.logger import log
|
from manimlib.logger import log
|
||||||
from manimlib.utils.config_ops import merge_dicts_recursively
|
from manimlib.utils.config_ops import merge_dicts_recursively
|
||||||
from manimlib.utils.init_config import init_customization
|
from manimlib.utils.init_config import init_customization
|
||||||
|
from manimlib.constants import FRAME_HEIGHT
|
||||||
|
|
||||||
|
|
||||||
__config_file__ = "custom_config.yml"
|
__config_file__ = "custom_config.yml"
|
||||||
|
@ -416,7 +417,9 @@ def get_configuration(args):
|
||||||
def get_camera_configuration(args, custom_config):
|
def get_camera_configuration(args, custom_config):
|
||||||
camera_config = {}
|
camera_config = {}
|
||||||
camera_resolutions = get_custom_config()["camera_resolutions"]
|
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"]
|
resolution = camera_resolutions["low"]
|
||||||
elif args.medium_quality:
|
elif args.medium_quality:
|
||||||
resolution = camera_resolutions["med"]
|
resolution = camera_resolutions["med"]
|
||||||
|
@ -439,6 +442,9 @@ def get_camera_configuration(args, custom_config):
|
||||||
camera_config.update({
|
camera_config.update({
|
||||||
"pixel_width": width,
|
"pixel_width": width,
|
||||||
"pixel_height": height,
|
"pixel_height": height,
|
||||||
|
"frame_config": {
|
||||||
|
"frame_shape": ((width / height) * FRAME_HEIGHT, FRAME_HEIGHT),
|
||||||
|
},
|
||||||
"fps": fps,
|
"fps": fps,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue