From e9d7f6607b1c2e6a778127066bea17afe685ddc0 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 27 Jan 2023 01:25:49 +0100 Subject: [PATCH] Generate frameStartHandle and frameEndHandle accordingly --- .../maya/plugins/publish/collect_new_instances.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/collect_new_instances.py b/openpype/hosts/maya/plugins/publish/collect_new_instances.py index f06f92678e..6166a4878d 100644 --- a/openpype/hosts/maya/plugins/publish/collect_new_instances.py +++ b/openpype/hosts/maya/plugins/publish/collect_new_instances.py @@ -104,6 +104,17 @@ class CollectNewInstances(pyblish.api.InstancePlugin): # Store the exact members of the object set instance.data["setMembers"] = members + # TODO: This might make more sense as a separate collector + # Collect frameStartHandle and frameEndHandle if frames present + if "frameStart" in instance.data: + handle_start = instance.data.get("handleStart", 0) + frame_start_handle = instance.data["frameStart"] - handle_start + instance.data["frameStartHandle"] = frame_start_handle + if "frameEnd" in instance.data: + handle_end = instance.data.get("handleEnd", 0) + frame_end_handle = instance.data["frameEnd"] + handle_end + instance.data["frameEndHandle"] = frame_end_handle + def get_all_parents(self, nodes): """Get all parents by using string operations (optimization)