mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
removed unnecessary command group
This commit is contained in:
parent
ddbec4ea71
commit
d353dd145a
2 changed files with 6 additions and 35 deletions
|
|
@ -292,7 +292,6 @@ def get_config_file_rules_colorspace_from_filepath(config_path, filepath):
|
|||
)
|
||||
else:
|
||||
result_data = _get_wrapped_with_subprocess(
|
||||
"colorspace",
|
||||
"get_config_file_rules_colorspace_from_filepath",
|
||||
config_path=config_path,
|
||||
filepath=filepath
|
||||
|
|
@ -321,7 +320,6 @@ def get_config_version_data(config_path):
|
|||
version_data = _get_config_version_data(config_path)
|
||||
else:
|
||||
version_data = _get_wrapped_with_subprocess(
|
||||
"config",
|
||||
"get_config_version_data",
|
||||
config_path=config_path
|
||||
)
|
||||
|
|
@ -432,11 +430,10 @@ def validate_imageio_colorspace_in_config(config_path, colorspace_name):
|
|||
return True
|
||||
|
||||
|
||||
def _get_wrapped_with_subprocess(command_group, command, **kwargs):
|
||||
def _get_wrapped_with_subprocess(command, **kwargs):
|
||||
"""Get data via subprocess.
|
||||
|
||||
Args:
|
||||
command_group (str): command group name
|
||||
command (str): command name
|
||||
**kwargs: command arguments
|
||||
|
||||
|
|
@ -448,7 +445,6 @@ def _get_wrapped_with_subprocess(command_group, command, **kwargs):
|
|||
args = [
|
||||
"run",
|
||||
get_ocio_config_script_path(),
|
||||
command_group,
|
||||
command
|
||||
]
|
||||
|
||||
|
|
@ -501,7 +497,6 @@ def get_ocio_config_colorspaces(config_path):
|
|||
config_colorspaces = _get_ocio_config_colorspaces(config_path)
|
||||
else:
|
||||
config_colorspaces = _get_wrapped_with_subprocess(
|
||||
"config",
|
||||
"get_ocio_config_colorspaces",
|
||||
config_path=config_path
|
||||
)
|
||||
|
|
@ -699,7 +694,6 @@ def get_ocio_config_views(config_path):
|
|||
return _get_ocio_config_views(config_path)
|
||||
|
||||
return _get_wrapped_with_subprocess(
|
||||
"config",
|
||||
"get_ocio_config_views",
|
||||
config_path=config_path
|
||||
)
|
||||
|
|
@ -1288,7 +1282,6 @@ def get_display_view_colorspace_name(config_path, display, view):
|
|||
config_path, display, view
|
||||
)
|
||||
return _get_wrapped_with_subprocess(
|
||||
"config",
|
||||
"get_display_view_colorspace_name",
|
||||
config_path=config_path,
|
||||
display=display,
|
||||
|
|
@ -1538,7 +1531,6 @@ def get_colorspace_data_subprocess(config_path):
|
|||
dict: colorspace and family in couple
|
||||
"""
|
||||
return _get_wrapped_with_subprocess(
|
||||
"config",
|
||||
"get_ocio_config_colorspaces",
|
||||
config_path=config_path
|
||||
)
|
||||
|
|
@ -1559,7 +1551,6 @@ def get_views_data_subprocess(config_path):
|
|||
|
||||
"""
|
||||
return _get_wrapped_with_subprocess(
|
||||
"config",
|
||||
"get_ocio_config_views",
|
||||
config_path=config_path
|
||||
)
|
||||
|
|
|
|||
|
|
@ -33,27 +33,7 @@ def main():
|
|||
pass # noqa: WPS100
|
||||
|
||||
|
||||
@main.group()
|
||||
def config():
|
||||
"""Config related commands group
|
||||
|
||||
Example of use:
|
||||
> pyton.exe ./ocio_wrapper.py config <command> *args
|
||||
"""
|
||||
pass # noqa: WPS100
|
||||
|
||||
|
||||
@main.group()
|
||||
def colorspace():
|
||||
"""Colorspace related commands group
|
||||
|
||||
Example of use:
|
||||
> pyton.exe ./ocio_wrapper.py config <command> *args
|
||||
"""
|
||||
pass # noqa: WPS100
|
||||
|
||||
|
||||
@config.command(
|
||||
@main.command(
|
||||
name="get_ocio_config_colorspaces",
|
||||
help="return all colorspaces from config file")
|
||||
@click.option(
|
||||
|
|
@ -83,7 +63,7 @@ def _get_ocio_config_colorspaces(config_path, output_path):
|
|||
)
|
||||
|
||||
|
||||
@config.command(
|
||||
@main.command(
|
||||
name="get_ocio_config_views",
|
||||
help="All viewers from config file")
|
||||
@click.option(
|
||||
|
|
@ -113,7 +93,7 @@ def _get_ocio_config_views(config_path, output_path):
|
|||
)
|
||||
|
||||
|
||||
@config.command(
|
||||
@main.command(
|
||||
name="get_config_version_data",
|
||||
help="Get major and minor version from config file")
|
||||
@click.option(
|
||||
|
|
@ -143,7 +123,7 @@ def _get_config_version_data(config_path, output_path):
|
|||
)
|
||||
|
||||
|
||||
@colorspace.command(
|
||||
@main.command(
|
||||
name="get_config_file_rules_colorspace_from_filepath",
|
||||
help="Colorspace file rules from filepath")
|
||||
@click.option(
|
||||
|
|
@ -182,7 +162,7 @@ def _get_config_file_rules_colorspace_from_filepath(
|
|||
)
|
||||
|
||||
|
||||
@config.command(
|
||||
@main.command(
|
||||
name="get_display_view_colorspace_name",
|
||||
help=(
|
||||
"Default view colorspace name for the given display and view"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue