mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
fixing cashing nested data structure
This commit is contained in:
parent
05b0f61e0b
commit
6473fac904
1 changed files with 4 additions and 2 deletions
|
|
@ -17,9 +17,11 @@ from openpype.pipeline import Anatomy
|
|||
|
||||
log = Logger.get_logger(__name__)
|
||||
|
||||
|
||||
class cashed_data:
|
||||
remapping: dict = None
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def _make_temp_json_file():
|
||||
"""Wrapping function for json temp file
|
||||
|
|
@ -510,7 +512,7 @@ def get_remapped_colorspace_to_native(
|
|||
str: native colorspace name defined in remapping or None
|
||||
"""
|
||||
|
||||
if not cashed_data.remapping.get(host_name):
|
||||
if not cashed_data.remapping.get(host_name, {}).get("to_native"):
|
||||
remapping_rules = imageio_host_settings["remapping"]["rules"]
|
||||
cashed_data.remapping[host_name] = {
|
||||
"to_native": {
|
||||
|
|
@ -534,7 +536,7 @@ def get_remapped_colorspace_from_native(
|
|||
str: ocio colorspace name defined in remapping or None
|
||||
"""
|
||||
|
||||
if not cashed_data.remapping.get(host_name):
|
||||
if not cashed_data.remapping.get(host_name, {}).get("from_native"):
|
||||
remapping_rules = imageio_host_settings["remapping"]["rules"]
|
||||
cashed_data.remapping[host_name] = {
|
||||
"from_native": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue