From a5b93a9062dc957b06f1b99e10b0298318bda909 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Tue, 20 Jun 2023 16:30:44 +0100 Subject: [PATCH 1/2] Copy shading assignments. --- openpype/hosts/maya/plugins/publish/extract_xgen.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/extract_xgen.py b/openpype/hosts/maya/plugins/publish/extract_xgen.py index fb097ca84a..17b60e3108 100644 --- a/openpype/hosts/maya/plugins/publish/extract_xgen.py +++ b/openpype/hosts/maya/plugins/publish/extract_xgen.py @@ -88,6 +88,18 @@ class ExtractXgen(publish.Extractor): delete_bin.append(palette) + # Copy shading assignments. + nodes = ( + instance.data["xgmDescriptions"] + + instance.data["xgmSubdPatches"] + ) + for node in nodes: + target_node = node.split(":")[-1] + shading_engine = cmds.listConnections( + node, type="shadingEngine" + )[0] + cmds.sets(target_node, edit=True, forceElement=shading_engine) + # Export duplicated palettes. xgenm.exportPalette(palette, xgen_path) From 8d621f9fbfb962fcde09c97bdc09080f7f0370cd Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Tue, 20 Jun 2023 17:42:34 +0100 Subject: [PATCH 2/2] Fix patches export. --- openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py b/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py index 20e1bd37d8..0d2a97bc4b 100644 --- a/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py +++ b/openpype/hosts/maya/plugins/publish/extract_workfile_xgen.py @@ -57,7 +57,7 @@ class ExtractWorkfileXgen(publish.Extractor): continue render_start_frame = instance.data["frameStart"] - render_end_frame = instance.data["frameStart"] + render_end_frame = instance.data["frameEnd"] if start_frame is None: start_frame = render_start_frame