![]() |
|
Go to the source code of this file.
Functions | |
USDUTILS_API bool | UsdUtilsCreateNewUsdzPackage (const SdfAssetPath &assetPath, const std::string &usdzFilePath, const std::string &firstLayerName=std::string()) |
Creates a USDZ package containing the specified asset, identified by its assetPath . | |
USDUTILS_API bool | UsdUtilsCreateNewARKitUsdzPackage (const SdfAssetPath &assetPath, const std::string &usdzFilePath, const std::string &firstLayerName=std::string()) |
Similar to UsdUtilsCreateNewUsdzPackage, this function packages all of the dependencies of the given asset. | |
USDUTILS_API bool UsdUtilsCreateNewARKitUsdzPackage | ( | const SdfAssetPath & | assetPath, |
const std::string & | usdzFilePath, | ||
const std::string & | firstLayerName = std::string() |
||
) |
Similar to UsdUtilsCreateNewUsdzPackage, this function packages all of the dependencies of the given asset.
Assets targeted at the initial usdz implementation in ARKit operate under greater constraints than usdz files for more general 'in house' uses, and this option attempts to ensure that these constraints are honored; this may involve more transformations to the data, which may cause loss of features such as VariantSets. Any anonymous layers that are encountered during dependency discovery will be serialized into the resulting package.
If firstLayerName
is specified, it is modified to have the ".usdc" extension, as required by the initial usdz implementation in ARKit.
Returns true if the package was created successfully.
assetPath
(including the root layer and all transitive layer dependencies) in-place. However, it does not save the layers before copying them into the package that is created. It also does not revert the changes it makes to the layers. Therefore, it is strongly recommended that you run this function in isolation after any source UsdStages have been closed. If you have UsdStages open during the function call that reference the layers being modified, you may receive warnings or composition errors which may not affect the resulting package adversely. USDUTILS_API bool UsdUtilsCreateNewUsdzPackage | ( | const SdfAssetPath & | assetPath, |
const std::string & | usdzFilePath, | ||
const std::string & | firstLayerName = std::string() |
||
) |
Creates a USDZ package containing the specified asset, identified by its assetPath
.
The created package will include a localized version of the asset itself and all of its external dependencies. Any anonymous layers that are encountered during dependency discovery will be serialized into the resulting package. Due to localization, the packaged layers might be modified to have different asset paths.
You can optionally specify a different package-internal name for the first layer of the asset by specifying firstLayerName
. By default, firstLayerName
is empty, meaning that the original name is preserved.
Returns true if the package was created successfully.
assetPath
(including the root layer and all transitive layer dependencies) in-place. However, it does not save the layers before copying them into the package that is created. It also does not revert the changes it makes to the layers. Therefore, it is strongly recommended that you run this function in isolation after any source UsdStages have been closed. If you have UsdStages open during the function call that reference the layers being modified, you may receive warnings or composition errors which may not affect the resulting package adversely.