Skip to content

Commit

Permalink
usd: Bump default version for newly created crate files to 0.9.0.
Browse files Browse the repository at this point in the history
Fixes #2838

(Internal change: 2308208)
  • Loading branch information
gitamohr authored and pixar-oss committed Dec 10, 2023
1 parent c4acf38 commit 4fc0981
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pxr/usd/usd/crateFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ TF_REGISTRY_FUNCTION(TfType) {
TfType::Define<Usd_CrateFile::TimeSamples>();
}

#define DEFAULT_NEW_VERSION "0.8.0"
#define DEFAULT_NEW_VERSION "0.9.0"
TF_DEFINE_ENV_SETTING(
USD_WRITE_NEW_USDC_FILES_AS_VERSION, DEFAULT_NEW_VERSION,
"When writing new Usd Crate files, write them as this version. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def test_ExportPayloadCrate(self):
self._VerifyLayerPrims(usdaLayer)

# Export the this layer to a usdc file and verify that it is exported
# using the 0.8.0 crate file version as new files start at 0.8.0.
# using the 0.9.0 crate file version as new files start at 0.9.0.
self.assertTrue(usdaLayer.Export(singlePayloadCrateFilename))
self._VerifyCrateVersion08(singlePayloadCrateFilename)
self._VerifyCrateVersion09(singlePayloadCrateFilename)

# Open the crate layer and verify that it has the same prims and
# payloads.
Expand All @@ -120,11 +120,11 @@ def test_ExportPayloadCrate(self):
Sdf.Payload('PayloadNew1.usda', Sdf.Path('/Parent')),
Sdf.Payload('PayloadNew2.usda', Sdf.Path('/Parent'))]

# Export layer to a new crate file and verify that it uses the 0.8.0
# Export layer to a new crate file and verify that it uses the 0.9.0
# crate version as this can not be represented in prior versions (and
# also it's now the default version for new crate files).
self.assertTrue(usdaLayer.Export(listPayloadCrateFilename))
self._VerifyCrateVersion08(listPayloadCrateFilename)
self._VerifyCrateVersion09(listPayloadCrateFilename)

# Similar to the generic _VerifyLayerPrims but instead verifies that
# '/PayloadRefNone' has two payloads instead.
Expand Down Expand Up @@ -178,10 +178,10 @@ def test_ExportPayloadCrateWithInternalPayload(self):
usdaPayloadNoOpinion = usdaLayer.GetPrimAtPath('/PayloadNoOpinion')
usdaPayloadNoOpinion.payloadList.explicitItems = [Sdf.Payload("","/PayloadRef1")]

# Export layer to a new crate file and verify that it uses the 0.8.0
# Export layer to a new crate file and verify that it uses the 0.9.0
# crate version as this can not be represented in prior versions.
self.assertTrue(usdaLayer.Export(internalPayloadCrateFilename))
self._VerifyCrateVersion08(internalPayloadCrateFilename)
self._VerifyCrateVersion09(internalPayloadCrateFilename)

# Similar to the generic _VerifyLayerPrims but instead verifies that
# '/PayloadRefNoOpinion' has a single internal payload instead.
Expand Down Expand Up @@ -233,10 +233,10 @@ def test_ExportPayloadCrateWithLayerOffset(self):
usdaPayloadRef1.payloadList.explicitItems = [
Sdf.Payload('Payload.usda', Sdf.Path('/Parent'), Sdf.LayerOffset(12.0, 1.0))]

# Export layer to a new crate file and verify that it uses the 0.8.0
# Export layer to a new crate file and verify that it uses the 0.9.0
# crate version as this can not be represented in prior versions.
self.assertTrue(usdaLayer.Export(exportCrateFilename))
self._VerifyCrateVersion08(exportCrateFilename)
self._VerifyCrateVersion09(exportCrateFilename)

# Similar to the generic _VerifyLayerPrims but instead verifies that
# '/PayloadRef1' has a layer offset.
Expand Down

0 comments on commit 4fc0981

Please sign in to comment.