Skip to content

Commit

Permalink
Merge pull request #11 from ynput/bug/fix_tv_paint_get_current_workfi…
Browse files Browse the repository at this point in the history
…le_when_no_scene_is_opened

Return `None` from `get_current_workfile` when no workfile is currently opened
  • Loading branch information
iLLiCiTiT authored Sep 18, 2024
2 parents b3bf2e5 + 9181820 commit 825a5b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/ayon_tvpaint/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ def work_root(self, session):
return session["AYON_WORKDIR"]

def get_current_workfile(self):
return execute_george("tv_GetProjectName")
# 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 825a5b7

Please sign in to comment.