From 029e891cdfafc848eb47048de88b201896e0af1b Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 18 Jan 2023 17:21:45 +0100 Subject: [PATCH] global: privatisation of functions --- openpype/pipeline/colorspace.py | 8 ++++---- openpype/scripts/ocio_wrapper.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index 50a1e33f7f..e7480cf59e 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -213,8 +213,8 @@ def get_ocio_config_colorspaces(config_path): if sys.version_info[0] == 2: return get_colorspace_data_subprocess(config_path) - from ..scripts.ocio_wrapper import get_colorspace_data - return get_colorspace_data(config_path) + from ..scripts.ocio_wrapper import _get_colorspace_data + return _get_colorspace_data(config_path) def get_colorspace_data_subprocess(config_path): @@ -266,8 +266,8 @@ def get_ocio_config_views(config_path): if sys.version_info[0] == 2: return get_views_data_subprocess(config_path) - from ..scripts.ocio_wrapper import get_views_data - return get_views_data(config_path) + from ..scripts.ocio_wrapper import _get_views_data + return _get_views_data(config_path) def get_views_data_subprocess(config_path): diff --git a/openpype/scripts/ocio_wrapper.py b/openpype/scripts/ocio_wrapper.py index 62b62371ca..0685b2e52a 100644 --- a/openpype/scripts/ocio_wrapper.py +++ b/openpype/scripts/ocio_wrapper.py @@ -8,13 +8,13 @@ Providing functionality: - get_colorspace - console command - python 2 - returning all available color spaces found in input config path. -- get_colorspace_data - python 3 - module function +- _get_colorspace_data - python 3 - module function - returning all available colorspaces found in input config path. - get_views - console command - python 2 - returning all available viewers found in input config path. -- get_views_data - python 3 - module function +- _get_views_data - python 3 - module function - returning all available viewers found in input config path. """ @@ -68,7 +68,7 @@ def get_colorspace(in_path, out_path): """ json_path = Path(out_path) - out_data = get_colorspace_data(in_path) + out_data = _get_colorspace_data(in_path) with open(json_path, "w") as f: json.dump(out_data, f) @@ -76,7 +76,7 @@ def get_colorspace(in_path, out_path): print(f"Colorspace data are saved to '{json_path}'") -def get_colorspace_data(config_path): +def _get_colorspace_data(config_path): """Return all found colorspace data. Args: @@ -130,7 +130,7 @@ def get_views(in_path, out_path): """ json_path = Path(out_path) - out_data = get_views_data(in_path) + out_data = _get_views_data(in_path) with open(json_path, "w") as f: json.dump(out_data, f) @@ -138,7 +138,7 @@ def get_views(in_path, out_path): print(f"Viewer data are saved to '{json_path}'") -def get_views_data(config_path): +def _get_views_data(config_path): """Return all found viewer data. Args: