instance data keys should not be optional

This commit is contained in:
Jakub Jezek 2023-09-25 11:21:02 +02:00
parent 0211f3da55
commit 51875f592e
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -580,8 +580,9 @@ class ExporterReview(object):
def get_file_info(self):
if self.collection:
# get path
self.fname = os.path.basename(self.collection.format(
"{head}{padding}{tail}"))
self.fname = os.path.basename(
self.collection.format("{head}{padding}{tail}")
)
self.fhead = self.collection.format("{head}")
# get first and last frame
@ -590,8 +591,8 @@ class ExporterReview(object):
else:
self.fname = os.path.basename(self.path_in)
self.fhead = os.path.splitext(self.fname)[0] + "."
self.first_frame = self.instance.data.get("frameStartHandle", None)
self.last_frame = self.instance.data.get("frameEndHandle", None)
self.first_frame = self.instance.data["frameStartHandle"]
self.last_frame = self.instance.data["frameEndHandle"]
if "#" in self.fhead:
self.fhead = self.fhead.replace("#", "")[:-1]