mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use standard conditions
This commit is contained in:
parent
21737339d3
commit
28978f07c6
1 changed files with 8 additions and 8 deletions
|
|
@ -1134,19 +1134,13 @@ def oiio_color_convert(
|
|||
])
|
||||
|
||||
# Validate input parameters
|
||||
if all([target_colorspace, target_view, target_display]):
|
||||
if target_colorspace and target_view and target_display:
|
||||
raise ValueError(
|
||||
"Colorspace and both screen and display cannot be set together."
|
||||
"Choose colorspace or screen and display"
|
||||
)
|
||||
|
||||
if all([source_view, source_display]) and source_colorspace:
|
||||
logger.warning(
|
||||
"Both source display/view and source_colorspace provided. "
|
||||
"Using source display/view pair and ignoring source_colorspace."
|
||||
)
|
||||
|
||||
if not target_colorspace and not all([target_view, target_display]):
|
||||
if not target_colorspace and not target_view and not target_display:
|
||||
raise ValueError(
|
||||
"Both screen and display must be set if target_colorspace is not "
|
||||
"provided."
|
||||
|
|
@ -1161,6 +1155,12 @@ def oiio_color_convert(
|
|||
"display/view inputs."
|
||||
)
|
||||
|
||||
if source_view and source_display and source_colorspace:
|
||||
logger.warning(
|
||||
"Both source display/view and source_colorspace provided. "
|
||||
"Using source display/view pair and ignoring source_colorspace."
|
||||
)
|
||||
|
||||
if additional_command_args:
|
||||
oiio_cmd.extend(additional_command_args)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue