mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
collect end frame for each instance individually
This commit is contained in:
parent
1aadb518cf
commit
1478f2559d
2 changed files with 10 additions and 4 deletions
|
|
@ -17,9 +17,6 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
))
|
||||
|
||||
for instance_data in workfile_instances:
|
||||
instance_data["frameStart"] = context.data["frameStart"]
|
||||
instance_data["frameEnd"] = context.data["frameEnd"]
|
||||
|
||||
# Store workfile instance data to instance data
|
||||
instance_data["originData"] = copy.deepcopy(instance_data)
|
||||
# Global instance data modifications
|
||||
|
|
@ -54,6 +51,16 @@ class CollectInstances(pyblish.api.ContextPlugin):
|
|||
"Instance with unknown family \"{}\": {}"
|
||||
)
|
||||
|
||||
frame_start = context.data["frameStart"]
|
||||
frame_end = frame_start
|
||||
for layer in instance.data["layers"]:
|
||||
_frame_end = layer["frame_end"]
|
||||
if _frame_end > frame_end:
|
||||
frame_end = _frame_end
|
||||
|
||||
instance.data["frameStart"] = frame_start
|
||||
instance.data["frameEnd"] = frame_end
|
||||
|
||||
self.log.debug("Created instance: {}\n{}".format(
|
||||
instance, json.dumps(instance.data, indent=4)
|
||||
))
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ class ExtractSequence(pyblish.api.Extractor):
|
|||
instance.data["representations"] = []
|
||||
|
||||
# Fill tags
|
||||
# TODO where to find out which tags should be added?
|
||||
if family_lowered in ("review", "renderlayer"):
|
||||
tags = ["review", "ftrack"]
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue