Skip to content

Commit

Permalink
Return None when no workfile is currently opened. Ported from: ynpu…
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy committed Sep 11, 2024
1 parent b3bf2e5 commit 1cb68e4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/ayon_tvpaint/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ def save_workfile(self, filepath=None):
def work_root(self, session):
return session["AYON_WORKDIR"]

def get_current_workfile(self):
return execute_george("tv_GetProjectName")
def get_current_workfile(self):
# TVPaint returns a '\' character when no scene is currently opened
current_workfile = execute_george("tv_GetProjectName")
if current_workfile == '\\':
return None
return current_workfile

def workfile_has_unsaved_changes(self):
return None
Expand Down

0 comments on commit 1cb68e4

Please sign in to comment.