From 070baad607482addbb1cf769586d7cb919525e97 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Mon, 12 Jul 2021 19:10:47 +0200 Subject: [PATCH] =?UTF-8?q?removed=20layer=20switching=20=F0=9F=93=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openpype/hosts/maya/api/lib.py | 6 ++---- openpype/hosts/maya/plugins/publish/collect_render.py | 4 ---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index b87e106865..b24235447f 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2252,10 +2252,8 @@ def get_attr_in_layer(attr, layer): try: if cmds.mayaHasRenderSetup(): - log.debug("lib.get_attr_in_layer is not " - "optimized for render setup") - with renderlayer(layer): - return cmds.getAttr(attr) + from . import lib_rendersetup + return lib_rendersetup.get_attr_in_layer(attr, layer) except AttributeError: pass diff --git a/openpype/hosts/maya/plugins/publish/collect_render.py b/openpype/hosts/maya/plugins/publish/collect_render.py index 5766dd67e5..86ee7d4d64 100644 --- a/openpype/hosts/maya/plugins/publish/collect_render.py +++ b/openpype/hosts/maya/plugins/publish/collect_render.py @@ -318,10 +318,6 @@ class CollectMayaRender(pyblish.api.ContextPlugin): instance.data.update(data) self.log.debug("data: {}".format(json.dumps(data, indent=4))) - # Restore current layer. - self.log.info("Restoring to {}".format(current_layer.name())) - self._rs.switchToLayer(current_layer) - def parse_options(self, render_globals): """Get all overrides with a value, skip those without.