From b6d3bf379e34c23c43598d1ec82fc5b57e234958 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 6 Sep 2024 00:31:42 +0200 Subject: [PATCH 1/3] Add label only if not same as shot name. In recent versions of AYON the "label" is always set by default and matches the "name" whereas previously, "label" defaulted to an empty value. Hence, due to that update, this logic now needed to change to correctly detect whether a customized label was set. --- client/ayon_maya/plugins/create/create_multishot_layout.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ayon_maya/plugins/create/create_multishot_layout.py b/client/ayon_maya/plugins/create/create_multishot_layout.py index 52298231..bc74a3b6 100644 --- a/client/ayon_maya/plugins/create/create_multishot_layout.py +++ b/client/ayon_maya/plugins/create/create_multishot_layout.py @@ -161,8 +161,10 @@ def create(self, product_name, instance_data, pre_create_data): layout_task_name = pre_create_data["taskName"] layout_task_entity = task_entities[layout_task_name] - shot_name = f"{shot['name']}%s" % ( - f" ({shot['label']})" if shot["label"] else "") + shot_name = shot['name'] + if shot["label"] and shot["label"] != shot_name: + shot_name += f" ({shot['label']})" + cmds.shot(sequenceStartTime=shot["attrib"]["clipIn"], sequenceEndTime=shot["attrib"]["clipOut"], shotName=shot_name) From 0a2dfd5df2b9e3f76f152369972e08f01b391401 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 13 Sep 2024 09:10:51 +0200 Subject: [PATCH 2/3] Fix nodes with component assignments not being collected as the shape, but the transform instead --- client/ayon_maya/plugins/publish/collect_look.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/ayon_maya/plugins/publish/collect_look.py b/client/ayon_maya/plugins/publish/collect_look.py index b039dc52..610ea2cb 100644 --- a/client/ayon_maya/plugins/publish/collect_look.py +++ b/client/ayon_maya/plugins/publish/collect_look.py @@ -486,8 +486,12 @@ def collect_member_data(self, member, instance_members): dict """ - node, components = (member.rsplit(".", 1) + [None])[:2] + if components and not cmds.objectType(node, isAType="shape"): + # Components are always on shapes. When only a single shape is + # parented under a transform Maya returns it as e.g. `cube.f[0:4]` + # instead of `cubeShape.f[0:4]` so we expand that to the shape + node = cmds.listRelatives(node, shapes=True, fullPath=True)[0] # Only include valid members of the instance if node not in instance_members: From e45f860d25f163f9d88e279669ed6c63fba915b5 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 14 Sep 2024 15:42:21 +0200 Subject: [PATCH 3/3] Fix error on parent and child members in object set with include parent hierarchy disabled --- client/ayon_maya/plugins/publish/extract_pointcache.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/ayon_maya/plugins/publish/extract_pointcache.py b/client/ayon_maya/plugins/publish/extract_pointcache.py index 937485c4..545d8136 100644 --- a/client/ayon_maya/plugins/publish/extract_pointcache.py +++ b/client/ayon_maya/plugins/publish/extract_pointcache.py @@ -15,6 +15,7 @@ from ayon_maya.api.alembic import extract_alembic from ayon_maya.api.lib import ( get_all_children, + get_highest_in_hierarchy, iter_visible_nodes_in_range, maintained_selection, suspended_refresh, @@ -129,7 +130,10 @@ def process(self, instance): # Set the root nodes if we don't want to include parents # The roots are to be considered the ones that are the actual # direct members of the set - root = roots + # We ignore members that are children of other members to avoid + # the parenting / ancestor relationship error on export and assume + # the user intended to export starting at the top of the two. + root = get_highest_in_hierarchy(roots) kwargs = { "file": path,