From 85748589ef4cdbda6ad65c59c3130ad2901dc0b4 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Thu, 2 Jun 2022 11:18:02 +0200 Subject: [PATCH 1/3] :bug: skip empty attributes --- openpype/hosts/maya/plugins/publish/collect_look.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/collect_look.py b/openpype/hosts/maya/plugins/publish/collect_look.py index 323bede7611..9b6d1d999c2 100644 --- a/openpype/hosts/maya/plugins/publish/collect_look.py +++ b/openpype/hosts/maya/plugins/publish/collect_look.py @@ -601,6 +601,9 @@ def collect_resources(self, node): source, computed_source)) + if not source: + self.log.info("source is empty, skipping...") + continue # We replace backslashes with forward slashes because V-Ray # can't handle the UDIM files with the backslashes in the # paths as the computed patterns From 9babdb7832c9cc6644e0dc4ff8f3d024b068fd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Tue, 7 Jun 2022 14:18:48 +0200 Subject: [PATCH 2/3] :recycle: limit the scope of file attribute skipping filter --- openpype/hosts/maya/plugins/publish/collect_look.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_look.py b/openpype/hosts/maya/plugins/publish/collect_look.py index 9b6d1d999c2..60af5238d02 100644 --- a/openpype/hosts/maya/plugins/publish/collect_look.py +++ b/openpype/hosts/maya/plugins/publish/collect_look.py @@ -601,8 +601,10 @@ def collect_resources(self, node): source, computed_source)) - if not source: - self.log.info("source is empty, skipping...") + # renderman allows nodes to have filename attribute empty while + # you can have another incoming connection from different node. + if not source and cmds.nodeType(node).lower().startswith("pxr"): + self.log.info("Renderman: source is empty, skipping...") continue # We replace backslashes with forward slashes because V-Ray # can't handle the UDIM files with the backslashes in the From f760c9d767c46a0ee433e83890cc15b4565f412f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Tue, 7 Jun 2022 15:28:11 +0200 Subject: [PATCH 3/3] :recycle: more explicit renderman check --- openpype/hosts/maya/plugins/publish/collect_look.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_look.py b/openpype/hosts/maya/plugins/publish/collect_look.py index 60af5238d02..4a34cfdea22 100644 --- a/openpype/hosts/maya/plugins/publish/collect_look.py +++ b/openpype/hosts/maya/plugins/publish/collect_look.py @@ -603,7 +603,14 @@ def collect_resources(self, node): # renderman allows nodes to have filename attribute empty while # you can have another incoming connection from different node. - if not source and cmds.nodeType(node).lower().startswith("pxr"): + pxr_nodes = set() + if cmds.pluginInfo("RenderMan_for_Maya", query=True, loaded=True): + pxr_nodes = set( + cmds.pluginInfo("RenderMan_for_Maya", + query=True, + dependNode=True) + ) + if not source and cmds.nodeType(node) in pxr_nodes: self.log.info("Renderman: source is empty, skipping...") continue # We replace backslashes with forward slashes because V-Ray