Skip to content

Commit

Permalink
Merge pull request #7 from ynput/enhancement/improve_validation_unsav…
Browse files Browse the repository at this point in the history
…ed_workfile

Do not error on Collect Workfile Representations if current file is unsaved
  • Loading branch information
BigRoy authored Aug 29, 2024
2 parents b1628db + 30e5ff3 commit 0e50406
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ class CollectWorkfileRepresentation(pyblish.api.InstancePlugin):
def process(self, instance):

context = instance.context
current_file = context.data["currentFile"]
current_file = context.data.get("currentFile")
if not current_file:
self.log.warning("Current file is not saved. File could not be "
"collected as workfile representation.")
return

folder, file = os.path.split(current_file)
filename, ext = os.path.splitext(file)
Expand Down

0 comments on commit 0e50406

Please sign in to comment.