fix(nks): improving first frame tag implementation

This commit is contained in:
Jakub Jezek 2019-07-09 18:58:10 +02:00
parent 8e52b5cbc3
commit b8ddf3e3e0
2 changed files with 10 additions and 3 deletions

View file

@ -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"):

View file

@ -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,