3434from open_vp_cal .project_settings import ProjectSettings
3535
3636
37- def open_ui () -> None :
37+ def open_ui (enable_aces_2 : bool = False ) -> None :
3838 """ Opens the MainWindow as QApplication after the splash screen loads
39+
40+ Args:
41+ enable_aces_2: Whether to use the ACES 2.0 OCIO config instead of the default
3942 """
43+ ResourceLoader .set_enable_aces_2 (enable_aces_2 )
4044 from PySide6 .QtWidgets import QMessageBox
4145 from PySide6 import QtWidgets
4246 from PySide6 .QtGui import QPixmap
@@ -211,7 +215,8 @@ def add_error_to_log(error_log: str, error: str) -> None:
211215def run_cli (
212216 project_settings_file_path : str ,
213217 output_folder : str ,
214- ocio_config_path : str = None , force = False , error_log : str = None , export_analysis_swatches : bool = False ) -> dict [str , LedWallSettings ]:
218+ ocio_config_path : str = None , force = False , error_log : str = None , export_analysis_swatches : bool = False ,
219+ enable_aces_2 : bool = False ) -> dict [str , LedWallSettings ]:
215220 """ Runs the application in CLI mode to process the given project settings file.
216221
217222 Args:
@@ -222,10 +227,13 @@ def run_cli(
222227 primarily for testing purposes
223228 error_log: The error log file path to store errors in as a json file
224229 export_analysis_swatches: For debugging we can force the swatches to be exported after the analysis
230+ enable_aces_2: Whether to use the ACES 2.0 OCIO config instead of the default
225231
226232 Returns: The list of ProcessingResults
227233
228234 """
235+ ResourceLoader .set_enable_aces_2 (enable_aces_2 )
236+
229237 project_settings = ProjectSettings .from_json (project_settings_file_path )
230238 project_settings .output_folder = output_folder
231239 open_vp_cal_base = OpenVPCalBase ()
@@ -314,7 +322,7 @@ def run_args(args: argparse.Namespace) -> None:
314322 args: The command line arguments
315323 """
316324 if args .ui :
317- open_ui ()
325+ open_ui (enable_aces_2 = args . enable_aces_2 )
318326 else :
319327
320328 if args .generate_patterns :
@@ -328,7 +336,8 @@ def run_args(args: argparse.Namespace) -> None:
328336 args .output_folder ,
329337 args .ocio_config_path ,
330338 force = args .ignore_errors ,
331- error_log = args .error_log
339+ error_log = args .error_log ,
340+ enable_aces_2 = args .enable_aces_2
332341 )
333342
334343
@@ -372,6 +381,8 @@ def parse_args() -> argparse.Namespace:
372381 parser .add_argument ('--ignore_errors' , type = str2bool , default = False ,
373382 help = 'CLI flag to ignore any errors produced during the calibration process and logging them in the provided error log file' )
374383 parser .add_argument ('--error_log' , required = False , help = 'A file path to store any errors in a json file, the file is created if it does not already exist' )
384+ parser .add_argument ('--enable_aces_2' , type = str2bool , default = False ,
385+ help = 'CLI flag to use the ACES 2.0 OCIO config instead of the default ACES 1.3 config' )
375386 args = parser .parse_args (sys .argv [1 :])
376387
377388 if not args .ui :
0 commit comments