All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
layerUtils.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/usd/sdf/declareHandles.h"
#include "pxr/usd/sdf/layer.h"
#include <string>
+ Include dependency graph for layerUtils.h:

Go to the source code of this file.


SDF_API std::string SdfComputeAssetPathRelativeToLayer (const SdfLayerHandle &anchor, const std::string &assetPath)

Function Documentation

SDF_API std::string SdfComputeAssetPathRelativeToLayer ( const SdfLayerHandle &  anchor,
const std::string assetPath 

Returns the path to the asset specified by assetPath, using the anchor layer to anchor the path if it is relative. If the result of anchoring assetPath to anchor's path cannot be resolved and assetPath is a search path, assetPath will be returned. If assetPath is not relative, assetPath will be returned. Otherwise, the anchored path will be returned.

Note that if anchor is an anonymous layer, we will always return the untouched assetPath.