mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
safer handle values getting
This commit is contained in:
parent
ffa3d34f7a
commit
b964218fc2
1 changed files with 9 additions and 8 deletions
|
|
@ -238,15 +238,16 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
frame_start = instance.data["frameStart"]
|
frame_start = instance.data["frameStart"]
|
||||||
handle_start = instance.data.get(
|
|
||||||
"handleStart",
|
|
||||||
instance.context.data["handleStart"]
|
|
||||||
)
|
|
||||||
frame_end = instance.data["frameEnd"]
|
frame_end = instance.data["frameEnd"]
|
||||||
handle_end = instance.data.get(
|
|
||||||
"handleEnd",
|
# Try to get handles from instance
|
||||||
instance.context.data["handleEnd"]
|
handle_start = instance.data.get("handleStart")
|
||||||
)
|
handle_end = instance.data.get("handleEnd")
|
||||||
|
# If even one of handle values is not set on instance use
|
||||||
|
# handles from context
|
||||||
|
if handle_start is None or handle_end is None:
|
||||||
|
handle_start = instance.context.data["handleStart"]
|
||||||
|
handle_end = instance.context.data["handleEnd"]
|
||||||
|
|
||||||
frame_start_handle = frame_start - handle_start
|
frame_start_handle = frame_start - handle_start
|
||||||
frame_end_handle = frame_end + handle_end
|
frame_end_handle = frame_end + handle_end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue