mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
removed unused workio
This commit is contained in:
parent
88b900bda0
commit
3265088887
2 changed files with 0 additions and 75 deletions
|
|
@ -8,15 +8,6 @@ from .pipeline import (
|
|||
TVPaintHost,
|
||||
)
|
||||
|
||||
from .workio import (
|
||||
open_file,
|
||||
save_file,
|
||||
current_file,
|
||||
has_unsaved_changes,
|
||||
file_extensions,
|
||||
work_root,
|
||||
)
|
||||
|
||||
|
||||
__all__ = (
|
||||
"CommunicationWrapper",
|
||||
|
|
@ -28,12 +19,4 @@ __all__ = (
|
|||
"plugin",
|
||||
|
||||
"TVPaintHost",
|
||||
|
||||
# Workfiles API
|
||||
"open_file",
|
||||
"save_file",
|
||||
"current_file",
|
||||
"has_unsaved_changes",
|
||||
"file_extensions",
|
||||
"work_root"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
"""Host API required for Work Files.
|
||||
# TODO @iLLiCiT implement functions:
|
||||
has_unsaved_changes
|
||||
"""
|
||||
|
||||
from openpype.pipeline import (
|
||||
HOST_WORKFILE_EXTENSIONS,
|
||||
legacy_io,
|
||||
)
|
||||
from .lib import (
|
||||
execute_george,
|
||||
execute_george_through_file
|
||||
)
|
||||
from .pipeline import save_current_workfile_context
|
||||
|
||||
|
||||
def open_file(filepath):
|
||||
"""Open the scene file in Blender."""
|
||||
george_script = "tv_LoadProject '\"'\"{}\"'\"'".format(
|
||||
filepath.replace("\\", "/")
|
||||
)
|
||||
return execute_george_through_file(george_script)
|
||||
|
||||
|
||||
def save_file(filepath):
|
||||
"""Save the open scene file."""
|
||||
# Store context to workfile before save
|
||||
context = {
|
||||
"project": legacy_io.Session["AVALON_PROJECT"],
|
||||
"asset": legacy_io.Session["AVALON_ASSET"],
|
||||
"task": legacy_io.Session["AVALON_TASK"]
|
||||
}
|
||||
save_current_workfile_context(context)
|
||||
|
||||
# Execute george script to save workfile.
|
||||
george_script = "tv_SaveProject {}".format(filepath.replace("\\", "/"))
|
||||
return execute_george(george_script)
|
||||
|
||||
|
||||
def current_file():
|
||||
"""Return the path of the open scene file."""
|
||||
george_script = "tv_GetProjectName"
|
||||
return execute_george(george_script)
|
||||
|
||||
|
||||
def has_unsaved_changes():
|
||||
"""Does the open scene file have unsaved changes?"""
|
||||
return False
|
||||
|
||||
|
||||
def file_extensions():
|
||||
"""Return the supported file extensions for Blender scene files."""
|
||||
return HOST_WORKFILE_EXTENSIONS["tvpaint"]
|
||||
|
||||
|
||||
def work_root(session):
|
||||
"""Return the default root to browse for work files."""
|
||||
return session["AVALON_WORKDIR"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue