mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
ImageIO: Minor fixes (#5147)
* define variable 'resolved_path' in right scope * fixed missing 'input' variable * make checks for keys more explicit and safe proof * fixed caching of remapped colorspaces * trying to fix indentation issue * use safe keys pop
This commit is contained in:
parent
f9a64192b3
commit
7ecb03bb75
2 changed files with 56 additions and 59 deletions
|
|
@ -2020,11 +2020,11 @@ class WorkfileSettings(object):
|
|||
# TODO: backward compatibility for old projects - remove later
|
||||
# perhaps old project overrides is having it set to older version
|
||||
# with use of `customOCIOConfigPath`
|
||||
resolved_path = None
|
||||
if workfile_settings.get("customOCIOConfigPath"):
|
||||
unresolved_path = workfile_settings["customOCIOConfigPath"]
|
||||
ocio_paths = unresolved_path[platform.system().lower()]
|
||||
|
||||
resolved_path = None
|
||||
for ocio_p in ocio_paths:
|
||||
resolved_path = str(ocio_p).format(**os.environ)
|
||||
if not os.path.exists(resolved_path):
|
||||
|
|
@ -2054,9 +2054,9 @@ class WorkfileSettings(object):
|
|||
self._root_node["colorManagement"].setValue("OCIO")
|
||||
|
||||
# we dont need the key anymore
|
||||
workfile_settings.pop("customOCIOConfigPath")
|
||||
workfile_settings.pop("colorManagement")
|
||||
workfile_settings.pop("OCIO_config")
|
||||
workfile_settings.pop("customOCIOConfigPath", None)
|
||||
workfile_settings.pop("colorManagement", None)
|
||||
workfile_settings.pop("OCIO_config", None)
|
||||
|
||||
# then set the rest
|
||||
for knob, value_ in workfile_settings.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue