From 5513b8da58bd08d96f6c957353651fd493f75ae9 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 18 Sep 2024 01:40:53 +0200 Subject: [PATCH 1/2] Draft to reduce output data from Maya USD animation export --- .../ayon_maya/plugins/publish/extract_maya_usd.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/client/ayon_maya/plugins/publish/extract_maya_usd.py b/client/ayon_maya/plugins/publish/extract_maya_usd.py index 6cfd2227..ad860279 100644 --- a/client/ayon_maya/plugins/publish/extract_maya_usd.py +++ b/client/ayon_maya/plugins/publish/extract_maya_usd.py @@ -240,6 +240,10 @@ def filter_members(self, members): # Can be overridden by inherited classes return members + def override_options(self, options: dict) -> dict: + # Can be overridden by inherited classes + return options + def process(self, instance): if not self.is_active(instance.data): return @@ -343,6 +347,8 @@ def parse_attr_str(attr_str): ) del options[key] + options = self.override_options(instance) + self.log.debug('Exporting USD: {} / {}'.format(file_path, members)) with maintained_time(): with maintained_selection(): @@ -417,6 +423,14 @@ def filter_members(self, members): members = cmds.ls(cmds.sets(out_set, query=True), long=True) return members + def override_options(self, options: dict) -> dict: + options = options.copy() + options["exportUVs"] = False + options["exportColorSets"] = False + options["exportMaterials"] = False + options["exportAssignedMaterials"] = False + return options + class ExtractMayaUsdModel(ExtractMayaUsd): """Extractor for Maya USD Asset data for model family From f95590e6be4c8588c7cc98b7c742905e2b6d7940 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 23 Oct 2024 15:33:29 +0200 Subject: [PATCH 2/2] Update client/ayon_maya/plugins/publish/extract_maya_usd.py Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com> --- client/ayon_maya/plugins/publish/extract_maya_usd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_maya/plugins/publish/extract_maya_usd.py b/client/ayon_maya/plugins/publish/extract_maya_usd.py index ad860279..545e3b81 100644 --- a/client/ayon_maya/plugins/publish/extract_maya_usd.py +++ b/client/ayon_maya/plugins/publish/extract_maya_usd.py @@ -347,7 +347,7 @@ def parse_attr_str(attr_str): ) del options[key] - options = self.override_options(instance) + options = self.override_options(options) self.log.debug('Exporting USD: {} / {}'.format(file_path, members)) with maintained_time():