Request for comments: moving file-related files from pxr/usd/usd to pxr/usd/sdf

Hey folks! We have a change in the works that allows us to remove the .sdf file format in favor of .usda and consolidate all usd-file-related logic into pxr/usd/sdf. Roughly, these changes will include the following (some specifics are still up in the air, like “should we move UsdUsdaFileFormat to just UsdaFileFormat?”):

Some #include’s will move from pxr/usd/usd to pxr/usd/sdf.

crateInfo
usdFileFormat
usdaFileFormat
usdcFileFormat
usdzFileFormat
zipFile

This will also introduce the following API changes and breakages.

C++ API
UsdCrateInfo -> SdfCrateInfo
UsdZipFile -> SdfZipFile

Python API
Usd.ZipFile -> Sdf.ZipFile
Usd.ZipFileWriter -> Sdf.ZipFileWriter
Usd.CrateInfo -> Sdf.CrateInfo
Usd.UsdFileFormat -> Sdf.UsdFileFormat

We feel these are obscure, unfrequented enough API such that cutting over directly to Sdf is reasonable. Do let us know if these are somehow embedded deep enough in your pipeline that you would benefit from a release-length deprecation time buffer :slight_smile:

I agree they might be less frequently used, but I saw new python code written just yesterday using Usd.ZipFile.

I think its worth the deprecation process, if only to inform the clients of those functions how to transition their code smoothly.

Its trivial to add a compile-time deprecation message in C++ and state they would be removed in the next release. Similarly in python, this is a straightforward runtime message to emit.

What is the downside? A small bit of code maintenance that lasts a couple months… It seems worth that cost to provide a helpful message that guides people to update properly.

Thanks @Andrew, we did end up going the proper deprecation route.

1 Like