HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
layerUtils.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_SDF_LAYER_UTILS_H
8 #define PXR_USD_SDF_LAYER_UTILS_H
9 
10 /// \file sdf/layerUtils.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/usd/sdf/api.h"
15 #include "pxr/usd/sdf/layer.h"
16 
17 #include <string>
18 
20 
22 
23 /// Returns the path to the asset specified by \p assetPath, using the
24 /// \p anchor layer to anchor the path if it is relative. If the result of
25 /// anchoring \p assetPath to \p anchor's path cannot be resolved and
26 /// \p assetPath is a search path, \p assetPath will be returned. If
27 /// \p assetPath is not relative, \p assetPath will be returned. Otherwise,
28 /// the anchored path will be returned.
29 ///
30 /// Note that if \p anchor is an anonymous layer, we will always return
31 /// the untouched \p assetPath.
32 SDF_API std::string
34  const SdfLayerHandle& anchor,
35  const std::string& assetPath);
36 
38 
39 #endif // PXR_USD_SDF_LAYER_UTILS_H
Definition: layer.h:81
SDF_API std::string SdfComputeAssetPathRelativeToLayer(const SdfLayerHandle &anchor, const std::string &assetPath)
PXR_NAMESPACE_OPEN_SCOPE SDF_DECLARE_HANDLES(SdfLayer)
#define SDF_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74