Navigation
API > API/Plugins > API/Plugins/USDUtilities
References
| Module | USDUtilities |
| Header | /Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Public/USDConversionUtils.h |
| Include | #include "USDConversionUtils.h" |
| Source | /Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDConversionUtils.cpp |
namespace UsdUtils
{
UE::FSdfPath UsdUtils&58;&58;GetPrimSpecPathForLayer
&40;
const UE::FUsdPrim & Prim,
const UE::FSdfLayer & Layer
&41;
}
Remarks
Returns a path exactly like Prim.GetPrimPath(), except that if the prim is within variant sets, it will return the full path with variant selections in it (i.e. the spec path), like "/Root/Child{Varset=Var}Inner" instead of just "/Root/Child/Inner".
It needs a layer because it is possible for a prim to be defined within a variant set in some layer, but then have an 'over' opinion defined in another layer without a variant, meaning the actual spec path depends on the layer.
Note that stage operations that involve manipulating specs require this full path instead (like removing/renaming prims), while other operations need the path with the stripped variant selections (like getting/defining/overriding prims)
Returns an empty path in case the layer doesn't have a spec for this prim.