From 7d25a26d220a2d85c4ae9cc95912f2b9a656d883 Mon Sep 17 00:00:00 2001 From: Ben Souchet Date: Wed, 11 Sep 2024 11:42:36 +0200 Subject: [PATCH] Maya ABC Camera extraction: Fix relationship bug --- openpype/hosts/maya/plugins/publish/extract_camera_alembic.py | 3 ++- .../hosts/maya/plugins/publish/extract_camera_mayaScene.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py b/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py index 43803743bcb..ac99d67d7f3 100644 --- a/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py +++ b/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py @@ -91,7 +91,8 @@ def process(self, instance): transform = cmds.listRelatives( member, parent=True, fullPath=True) transform = transform[0] if transform else member - job_str += ' -root {0}'.format(transform) + if transform not in camera_root: + job_str += ' -root {0}'.format(transform) job_str += ' -file "{0}"'.format(path) diff --git a/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py b/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py index f67e9db14fd..a4cd7356ecf 100644 --- a/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py +++ b/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py @@ -143,7 +143,7 @@ def process(self, instance): # get cameras members = set(cmds.ls(instance.data['setMembers'], leaf=True, shapes=True, long=True, dag=True)) - cameras = set(cmds.ls(members, leaf=True, shapes=True, long=True, + cameras = set(cmds.ls(members, shapes=True, long=True, dag=True, type="camera")) # validate required settings