From 4944f956700704d2ac969fd40a3a9521d5815fcd Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 14 Mar 2024 19:23:49 +0800 Subject: [PATCH] check if there is the name endswith 'Main' in the renderlayer --- .../ayon_core/hosts/maya/plugins/publish/collect_inputs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/ayon_core/hosts/maya/plugins/publish/collect_inputs.py b/client/ayon_core/hosts/maya/plugins/publish/collect_inputs.py index d0b1029a03..6dff64681f 100644 --- a/client/ayon_core/hosts/maya/plugins/publish/collect_inputs.py +++ b/client/ayon_core/hosts/maya/plugins/publish/collect_inputs.py @@ -180,6 +180,11 @@ class CollectUpstreamInputs(pyblish.api.InstancePlugin): return copy.deepcopy(scene_containers) else: # Get the members of the layer + renderlayer = next((i for i in cmds.ls(type='renderLayer') + if i.endswith(renderlayer)), None) + if renderlayer is None: + return copy.deepcopy(scene_containers) + members = cmds.editRenderLayerMembers(renderlayer, query=True, fullNames=True) or []