mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
clearing old code
This commit is contained in:
parent
1966482407
commit
31fa1a1200
1 changed files with 12 additions and 9 deletions
|
|
@ -10,11 +10,9 @@ from .lib import (
|
||||||
|
|
||||||
log = Logger.get_logger(__name__)
|
log = Logger.get_logger(__name__)
|
||||||
|
|
||||||
exported_project_ext = ".drp"
|
|
||||||
|
|
||||||
|
|
||||||
def file_extensions():
|
def file_extensions():
|
||||||
return [exported_project_ext]
|
return [".drp"]
|
||||||
|
|
||||||
|
|
||||||
def has_unsaved_changes():
|
def has_unsaved_changes():
|
||||||
|
|
@ -82,13 +80,18 @@ def open_file(filepath):
|
||||||
|
|
||||||
def current_file():
|
def current_file():
|
||||||
pm = get_project_manager()
|
pm = get_project_manager()
|
||||||
current_dir = os.getenv("AVALON_WORKDIR")
|
file_ext = file_extensions()[0]
|
||||||
|
workdir_path = os.getenv("AVALON_WORKDIR")
|
||||||
project = pm.GetCurrentProject()
|
project = pm.GetCurrentProject()
|
||||||
name = project.GetName()
|
project_name = project.GetName()
|
||||||
fname = name + exported_project_ext
|
file_name = project_name + file_ext
|
||||||
current_file = os.path.join(current_dir, fname)
|
|
||||||
if current_file:
|
# create current file path
|
||||||
return os.path.normpath(current_file)
|
current_file_path = os.path.join(workdir_path, file_name)
|
||||||
|
|
||||||
|
# return current file path if it exists
|
||||||
|
if os.path.exists(current_file_path):
|
||||||
|
return os.path.normpath(current_file_path)
|
||||||
|
|
||||||
|
|
||||||
def work_root(session):
|
def work_root(session):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue