From eeca6d0c73061f5534e51c792148043c58de485a Mon Sep 17 00:00:00 2001 From: Dan McGarry Date: Mon, 20 Jun 2022 10:09:50 -0700 Subject: [PATCH] Provide explicit export options in tests Provide explicit values for export options in open source tests even if they match defaults. This allows tests to pass in environments which run with site-specific export option overrides --- test/lib/mayaUsd/fileio/testComponentTags.py | 3 ++- test/lib/usd/translators/testUsdExportUVSetMappings.py | 3 ++- test/lib/usd/translators/testUsdExportUVSets.py | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/lib/mayaUsd/fileio/testComponentTags.py b/test/lib/mayaUsd/fileio/testComponentTags.py index eb92412ab1..dc6d929a2d 100644 --- a/test/lib/mayaUsd/fileio/testComponentTags.py +++ b/test/lib/mayaUsd/fileio/testComponentTags.py @@ -50,7 +50,8 @@ def testComponentTags(self): usdFilePath = os.path.join(os.environ.get('MAYA_APP_DIR'),'testComponentTags.usda') cmds.mayaUSDExport(mergeTransformAndShape=True, file=usdFilePath, - shadingMode='none') + shadingMode='none', + exportComponentTags=True) cmds.file(new=True, force=True) rootPaths = cmds.mayaUSDImport(v=True, f=usdFilePath) diff --git a/test/lib/usd/translators/testUsdExportUVSetMappings.py b/test/lib/usd/translators/testUsdExportUVSetMappings.py index f48f5da33a..24f467364d 100644 --- a/test/lib/usd/translators/testUsdExportUVSetMappings.py +++ b/test/lib/usd/translators/testUsdExportUVSetMappings.py @@ -44,7 +44,8 @@ def setUpClass(cls): cls._usdFilePath = os.path.abspath('UsdExportUVSetMappingsTest.usda') cmds.mayaUSDExport(mergeTransformAndShape=True, file=cls._usdFilePath, shadingMode='useRegistry', convertMaterialsTo=['UsdPreviewSurface'], - materialsScopeName='Materials') + materialsScopeName='Materials', preserveUVSetNames=False, + remapUVSetsTo=['','']) cls._stage = Usd.Stage.Open(cls._usdFilePath) diff --git a/test/lib/usd/translators/testUsdExportUVSets.py b/test/lib/usd/translators/testUsdExportUVSets.py index a586163c26..664ecf2c29 100644 --- a/test/lib/usd/translators/testUsdExportUVSets.py +++ b/test/lib/usd/translators/testUsdExportUVSets.py @@ -140,7 +140,9 @@ def setUp(self): shadingMode='none', exportColorSets=False, exportDisplayColor=False, - exportUVs=True) + exportUVs=True, + preserveUVSetNames=False, + remapUVSetsTo=[['','']]) testUsdExportUVSets._stage = Usd.Stage.Open(usdFilePath) @@ -394,7 +396,7 @@ def reexportUVSets(preserveUVSetNames, remapUVSetsTo): # Sets should not be renamed at all when preserveUVSetNames is True usdCubeMesh = reexportUVSets( preserveUVSetNames=True, - remapUVSetsTo=[]) + remapUVSetsTo=[['','']]) pvAPI = UsdGeom.PrimvarsAPI(usdCubeMesh) map1 = pvAPI.GetPrimvar('map1') st = pvAPI.GetPrimvar('st')