From b8ddf3e3e0ef3e1be119fb07688fe87320d468fc Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 9 Jul 2019 18:58:10 +0200 Subject: [PATCH] fix(nks): improving first frame tag implementation --- .../nukestudio/publish/collect_hierarchy_context.py | 9 ++++++++- pype/plugins/nukestudio/publish/collect_plates.py | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pype/plugins/nukestudio/publish/collect_hierarchy_context.py b/pype/plugins/nukestudio/publish/collect_hierarchy_context.py index 1147a40600..67591a63ee 100644 --- a/pype/plugins/nukestudio/publish/collect_hierarchy_context.py +++ b/pype/plugins/nukestudio/publish/collect_hierarchy_context.py @@ -227,6 +227,8 @@ class CollectHierarchyContext(pyblish.api.ContextPlugin): # get custom attributes of the shot if instance.data.get("main"): + start_frame = instance.data.get("frameStart", 0) + in_info['custom_attributes'] = { 'handles': int(instance.data.get('handles')), 'handle_start': handle_start, @@ -237,7 +239,12 @@ class CollectHierarchyContext(pyblish.api.ContextPlugin): "edit_in": int(instance.data["startFrame"]), "edit_out": int(instance.data["endFrame"]) } - + if start_frame is not 0: + in_info['custom_attributes'].update({ + 'fstart': start_frame - handle_start, + 'fend': start_frame + ( + instance.data["endFrame"] - instance.data["startFrame"]) + handle_end + }) # adding SourceResolution if Tag was present s_res = instance.data.get("sourceResolution") if s_res and instance.data.get("main"): diff --git a/pype/plugins/nukestudio/publish/collect_plates.py b/pype/plugins/nukestudio/publish/collect_plates.py index 9cf6d10209..77ed4097c8 100644 --- a/pype/plugins/nukestudio/publish/collect_plates.py +++ b/pype/plugins/nukestudio/publish/collect_plates.py @@ -73,7 +73,7 @@ class CollectPlates(api.InstancePlugin): timeline_frame_start = timeline_in - handle_start timeline_frame_end = timeline_out + handle_end - frame_start = 1 + frame_start = instance.data.get("frameStart", 1) frame_end = frame_start + (data["sourceOut"] - data["sourceIn"]) data.update( @@ -186,7 +186,7 @@ class CollectPlatesData(api.InstancePlugin): "handles": handle_start, "handleStart": handle_start, "handleEnd": handle_end, - "sourceIn": source_in, + "sourceIn": source_in, "sourceOut": source_out, "startFrame": frame_start, "endFrame": frame_end,