mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 19:03:01 +02:00
* arg parsing, minor name changes and fixes * reqs returned, scene and env added as args to rendering (not doing anything yet) * added folders for scenes and envs * added folders for scenes and envs (now they actually appear on GH after adding readmes) * added varying spheres amount
13 lines
395 B
Python
13 lines
395 B
Python
from configparser import ConfigParser
|
|
|
|
def load_config(config_path):
|
|
config = ConfigParser()
|
|
config.read(config_path)
|
|
return config
|
|
|
|
def parse_resolution(resolution):
|
|
try:
|
|
width, height = map(int, resolution.lower().split('x'))
|
|
return width, height
|
|
except ValueError:
|
|
raise ValueError("Resolution must be in the format WIDTHxHEIGHT, e.g., 1920x1080.") |