Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

[QUAD] Bug: Fix Tv Paint get_current_workfile when no scene is opened #6342

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion openpype/hosts/tvpaint/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,15 @@ def work_root(self, session):
return session["AVALON_WORKDIR"]

def get_current_workfile(self):
return execute_george("tv_GetProjectName")
# tvPaint return a '\' character when no scene is currently
# opened instead of a None value, which causes interferences
# in OpenPype's core code.
# So we check the returned value and send None if this
# character is retrieved.
current_workfile = execute_george("tv_GetProjectName")
if current_workfile == '\\':
current_workfile = None
return current_workfile

def workfile_has_unsaved_changes(self):
return None
Expand Down
Loading