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) 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: 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,