mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove unnecessary functions
This commit is contained in:
parent
5ff56aeda5
commit
43d9324e10
2 changed files with 0 additions and 110 deletions
|
|
@ -22,11 +22,8 @@ from .utils import (
|
|||
should_open_workfiles_tool_on_launch,
|
||||
MissingWorkdirError,
|
||||
|
||||
open_workfile,
|
||||
save_current_workfile_to,
|
||||
save_workfile_with_current_context,
|
||||
copy_and_open_workfile,
|
||||
copy_and_open_workfile_representation,
|
||||
save_workfile_info,
|
||||
find_workfile_rootless_path,
|
||||
)
|
||||
|
|
@ -66,11 +63,8 @@ __all__ = (
|
|||
"should_open_workfiles_tool_on_launch",
|
||||
"MissingWorkdirError",
|
||||
|
||||
"open_workfile",
|
||||
"save_current_workfile_to",
|
||||
"save_workfile_with_current_context",
|
||||
"copy_and_open_workfile",
|
||||
"copy_and_open_workfile_representation",
|
||||
"save_workfile_info",
|
||||
|
||||
"BuildWorkfile",
|
||||
|
|
|
|||
|
|
@ -305,25 +305,6 @@ def save_workfile_info(
|
|||
return workfile_entity
|
||||
|
||||
|
||||
def open_workfile(
|
||||
filepath: str,
|
||||
folder_entity: dict[str, Any],
|
||||
task_entity: dict[str, Any],
|
||||
*,
|
||||
prepared_data: Optional[OpenWorkfileOptionalData] = None,
|
||||
):
|
||||
from ayon_core.pipeline.context_tools import registered_host
|
||||
|
||||
# Trigger before save event
|
||||
host = registered_host()
|
||||
host.open_workfile_with_context(
|
||||
filepath,
|
||||
folder_entity,
|
||||
task_entity,
|
||||
prepared_data=prepared_data,
|
||||
)
|
||||
|
||||
|
||||
def save_current_workfile_to(
|
||||
workfile_path: str,
|
||||
folder_path: str,
|
||||
|
|
@ -417,91 +398,6 @@ def save_workfile_with_current_context(
|
|||
)
|
||||
|
||||
|
||||
def copy_and_open_workfile(
|
||||
src_workfile_path: str,
|
||||
workfile_path: str,
|
||||
folder_entity: dict[str, Any],
|
||||
task_entity: dict[str, Any],
|
||||
*,
|
||||
version: Optional[int] = None,
|
||||
comment: Optional[str] = None,
|
||||
description: Optional[str] = None,
|
||||
prepared_data: Optional[CopyWorkfileOptionalData] = None,
|
||||
) -> None:
|
||||
"""Copy workfile to new location and open it.
|
||||
|
||||
Args:
|
||||
src_workfile_path (str): Source workfile path.
|
||||
workfile_path (str): Destination workfile path.
|
||||
folder_entity (dict[str, Any]): Target folder entity.
|
||||
task_entity (dict[str, Any]): Target task entity.
|
||||
version (Optional[int]): Workfile version.
|
||||
comment (optional[str]): Workfile comment.
|
||||
description (Optional[str]): Workfile description.
|
||||
prepared_data (Optional[CopyWorkfileOptionalData]): Prepared data
|
||||
for speed enhancements.
|
||||
|
||||
"""
|
||||
from ayon_core.pipeline.context_tools import registered_host
|
||||
|
||||
host = registered_host()
|
||||
host.copy_workfile(
|
||||
src_workfile_path,
|
||||
workfile_path,
|
||||
folder_entity,
|
||||
task_entity,
|
||||
version=version,
|
||||
comment=comment,
|
||||
description=description,
|
||||
open_workfile=True,
|
||||
prepared_data=prepared_data,
|
||||
)
|
||||
|
||||
|
||||
def copy_and_open_workfile_representation(
|
||||
src_project_name: str,
|
||||
representation_entity: dict[str, Any],
|
||||
workfile_path: str,
|
||||
folder_entity: dict[str, Any],
|
||||
task_entity: dict[str, Any],
|
||||
*,
|
||||
version: Optional[int] = None,
|
||||
comment: Optional[str] = None,
|
||||
description: Optional[str] = None,
|
||||
prepared_data: Optional[CopyPublishedWorkfileOptionalData] = None,
|
||||
) -> None:
|
||||
"""Copy workfile to new location and open it.
|
||||
|
||||
Args:
|
||||
src_project_name (str): Project name where representation is stored.
|
||||
representation_entity (dict[str, Any]): Representation entity.
|
||||
workfile_path (str): Destination workfile path.
|
||||
folder_entity (dict[str, Any]): Target folder entity.
|
||||
task_entity (dict[str, Any]): Target task entity.
|
||||
version (Optional[int]): Workfile version.
|
||||
comment (optional[str]): Workfile comment.
|
||||
description (Optional[str]): Workfile description.
|
||||
prepared_data (Optional[CopyPublishedWorkfileOptionalData]): Prepared
|
||||
data for speed enhancements.
|
||||
|
||||
"""
|
||||
from ayon_core.pipeline.context_tools import registered_host
|
||||
|
||||
host = registered_host()
|
||||
host.copy_workfile_representation(
|
||||
src_project_name,
|
||||
representation_entity,
|
||||
workfile_path,
|
||||
folder_entity,
|
||||
task_entity,
|
||||
version=version,
|
||||
comment=comment,
|
||||
description=description,
|
||||
open_workfile=True,
|
||||
prepared_data=prepared_data,
|
||||
)
|
||||
|
||||
|
||||
def find_workfile_rootless_path(
|
||||
workfile_path: str,
|
||||
project_name: str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue