You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usdGenSchema uses UsdStage::Flatten and will try to anchor all asset paths. If an asset path refers to a URI resolver that isn't registered, the default resolver will treat the path like a file path and "normalize" away the //. For URIs, this effectively shifts the "authority" component into the "path" component of identifier.
There may be practical reasons why during usdGenSchema the asset and resolver may not be available. usdGenSchema depending on the availability of the resources required to run the resolvers used by attribute values may be unexpected.
If I suppress running SdfComputeAssetPathRelativeToLayer just for the omni: URI prefix in _AnchorAssetPathRelativeToLayer, the // is preserved.
Curiously, if I try to take advantage of "anchored paths" in my schema.usda file, it effectively resolves relative to the source directory. It doesn't seem like there's a use case for for the current anchoring behavior in usdGenSchema.
Steps to Reproduce
Save the above layer to schema.usda
Run the following code
>>> from pxr import Usd
>>> Usd.Stage.Open("./schema.usda").Flatten().ExportToString()
You should see // collapsed into / for myApi:assetReference, effectively erasing the "authority" component.
System Information (OS, Hardware)
Observed on both Linux and Windows
Package Versions
Build Flags
--tests -no-imaging --no-materialx
The text was updated successfully, but these errors were encountered:
…esolver is not registered to the resolver for the anchor layer. This can result in the path being modified by a resolver that does not have knowledge of how to deal with the particular path such as a layer loaded from disk referencing an asset located on a web server. This change adds an additional check to the path anchoring code used during USD stage flattening. In the case where an asset path has the same identifier created in both the non-anchored and anchored case, we will assume that this is an 'absolute' path and return it as is to avoid modification by the layer's resolver.
FixesPixarAnimationStudios#2480
(Internal change: 2286000)
Description of Issue
Consider the following
schema.usda
.usdGenSchema
usesUsdStage::Flatten
and will try to anchor all asset paths. If an asset path refers to a URI resolver that isn't registered, the default resolver will treat the path like a file path and "normalize" away the//
. For URIs, this effectively shifts the "authority" component into the "path" component of identifier.There may be practical reasons why during
usdGenSchema
the asset and resolver may not be available.usdGenSchema
depending on the availability of the resources required to run the resolvers used by attribute values may be unexpected.If I suppress running
SdfComputeAssetPathRelativeToLayer
just for theomni:
URI prefix in_AnchorAssetPathRelativeToLayer
, the//
is preserved.Curiously, if I try to take advantage of "anchored paths" in my
schema.usda
file, it effectively resolves relative to the source directory. It doesn't seem like there's a use case for for the current anchoring behavior inusdGenSchema
.Steps to Reproduce
schema.usda
//
collapsed into/
formyApi:assetReference
, effectively erasing the "authority" component.System Information (OS, Hardware)
Observed on both Linux and Windows
Package Versions
Build Flags
--tests -no-imaging --no-materialx
The text was updated successfully, but these errors were encountered: