From e78eb840ac83996f757b55d49ee378d51fea33ef Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 18 Jun 2019 14:24:19 +0200 Subject: [PATCH] frames adjusted to mov file --- pype/plugins/nuke/load/load_mov.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pype/plugins/nuke/load/load_mov.py b/pype/plugins/nuke/load/load_mov.py index 3723b57fa4..a3298ec341 100644 --- a/pype/plugins/nuke/load/load_mov.py +++ b/pype/plugins/nuke/load/load_mov.py @@ -92,8 +92,12 @@ class LoadMov(api.Loader): version = context['version'] version_data = version.get("data", {}) - first = version_data.get("startFrame", None) - last = version_data.get("endFrame", None) + orig_first = version_data.get("startFrame", None) + orig_last = version_data.get("endFrame", None) + diff = orig_first - 1 + # set first to 1 + first = orig_first - diff + last = orig_last - diff handles = version_data.get("handles", None) handle_start = version_data.get("handleStart", None) handle_end = version_data.get("handleEnd", None) @@ -103,9 +107,10 @@ class LoadMov(api.Loader): handle_start = handles handle_end = handles - # create handles offset - first -= handle_start - last += handle_end + # create handles offset (only to last, because of mov) + last += handle_start + handle_end + # offset should be with handles so it match orig frame range + offset_frame = orig_first + handle_start # Fallback to asset name when namespace is None if namespace is None: