From 4d0388fd435804027360c7ea17d7a04b81089fcc Mon Sep 17 00:00:00 2001 From: splidje Date: Mon, 11 May 2026 15:01:13 +0100 Subject: [PATCH 1/2] [version_handles_based_on_context] Version handles calculated based on context handles. Handle set for plate product type as well as render. --- client/ayon_nuke/plugins/publish/collect_writes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/ayon_nuke/plugins/publish/collect_writes.py b/client/ayon_nuke/plugins/publish/collect_writes.py index 2a633aa255..ce0cdd5375 100644 --- a/client/ayon_nuke/plugins/publish/collect_writes.py +++ b/client/ayon_nuke/plugins/publish/collect_writes.py @@ -172,9 +172,9 @@ def _set_additional_instance_data( color_channels = write_node["channels"].value() # get frame range data - handle_start = instance.context.data["handleStart"] - handle_end = instance.context.data["handleEnd"] first_frame, last_frame = self._get_frame_range_data(instance) + handle_start = max(0, root_first_frame + context_handle_start - first_frame) + handle_end = max(0, last_frame - (root_last_frame - context_handle_end)) # get output paths write_file_path = nuke.filename(write_node) @@ -198,8 +198,8 @@ def _set_additional_instance_data( for frame_number in range( # Excluding handles to match the logic when # loading timewarps - @splidje - int(nuke.root()["first_frame"].getValue()) + handle_start, - int(nuke.root()["last_frame"].getValue()) - handle_end + 1, + first_frame + handle_start, + last_frame - handle_end + 1, ): # The format for this lookup list is # the frame offset per frame @@ -224,7 +224,7 @@ def _set_additional_instance_data( "pixelAspect": write_node.pixelAspect(), }) - if product_base_type == "render": + if product_base_type in ("render", "plate"): instance.data.update({ "handleStart": handle_start, "handleEnd": handle_end, From 72992ca6ec2392f8e3dc00bca4a141f1ed643418 Mon Sep 17 00:00:00 2001 From: splidje Date: Tue, 12 May 2026 12:16:04 +0100 Subject: [PATCH 2/2] [version_handles_based_on_context] added missing lines setting root_first/last_frame and context_handle_start/end --- client/ayon_nuke/plugins/publish/collect_writes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/ayon_nuke/plugins/publish/collect_writes.py b/client/ayon_nuke/plugins/publish/collect_writes.py index ce0cdd5375..557bf11fca 100644 --- a/client/ayon_nuke/plugins/publish/collect_writes.py +++ b/client/ayon_nuke/plugins/publish/collect_writes.py @@ -172,6 +172,11 @@ def _set_additional_instance_data( color_channels = write_node["channels"].value() # get frame range data + root_first_frame = int(nuke.root()["first_frame"].getValue()) + root_last_frame = int(nuke.root()["last_frame"].getValue()) + context_handle_start = instance.context.data["handleStart"] + context_handle_end = instance.context.data["handleEnd"] + first_frame, last_frame = self._get_frame_range_data(instance) handle_start = max(0, root_first_frame + context_handle_start - first_frame) handle_end = max(0, last_frame - (root_last_frame - context_handle_end))