add missing variable 'handles' to loader (#4781)

This commit is contained in:
Jakub Trllo 2023-04-05 14:35:07 +02:00 committed by GitHub
parent 0019ff6f7d
commit 199f70e1ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -361,10 +361,11 @@ class SubsetsModel(TreeModel, BaseRepresentationModel):
version_data.get("endFrame", None)
)
handles_label = None
handle_start = version_data.get("handleStart", None)
handle_end = version_data.get("handleEnd", None)
if handle_start is not None and handle_end is not None:
handles = "{}-{}".format(str(handle_start), str(handle_end))
handles_label = "{}-{}".format(str(handle_start), str(handle_end))
if frame_start is not None and frame_end is not None:
# Remove superfluous zeros from numbers (3.0 -> 3) to improve
@ -401,7 +402,7 @@ class SubsetsModel(TreeModel, BaseRepresentationModel):
"frameStart": frame_start,
"frameEnd": frame_end,
"duration": duration,
"handles": handles,
"handles": handles_label,
"frames": frames,
"step": version_data.get("step", None),
})