All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
flattenLayerStack.h
Go to the documentation of this file.
1//
2// Copyright 2017 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_USD_UTILS_FLATTEN_LAYER_STACK_H
8#define PXR_USD_USD_UTILS_FLATTEN_LAYER_STACK_H
9
13
14#include "pxr/pxr.h"
15#include "pxr/usd/usd/stage.h"
16#include "pxr/usd/usdUtils/api.h"
19
20PXR_NAMESPACE_OPEN_SCOPE
21
22SDF_DECLARE_HANDLES(SdfLayer);
23
48USDUTILS_API
50UsdUtilsFlattenLayerStack(const UsdStagePtr &stage,
51 const std::string& tag = std::string());
52
60using UsdUtilsResolveAssetPathFn = std::function<std::string(
61 const SdfLayerHandle& sourceLayer,
62 const std::string& assetPath)>;
63
91USDUTILS_API
93UsdUtilsFlattenLayerStack(const UsdStagePtr &stage,
94 const UsdUtilsResolveAssetPathFn& resolveAssetPathFn,
95 const std::string& tag = std::string());
96
103USDUTILS_API
104std::string
106 const SdfLayerHandle& sourceLayer,
107 const std::string& assetPath);
108
109
110PXR_NAMESPACE_CLOSE_SCOPE
111
112#endif /* PXR_USD_USD_UTILS_FLATTEN_LAYER_STACK_H */
A scene description container that can combine with other such containers to form simple component as...
Definition: layer.h:84
USDUTILS_API std::string UsdUtilsFlattenLayerStackResolveAssetPath(const SdfLayerHandle &sourceLayer, const std::string &assetPath)
The default UsdUtilsResolvePathFn used by UsdUtilsFlattenLayerStack.
USDUTILS_API SdfLayerRefPtr UsdUtilsFlattenLayerStack(const UsdStagePtr &stage, const std::string &tag=std::string())
Flatten the root layer stack of the given stage into a single layer with the given optional tag.
std::function< std::string(const SdfLayerHandle &sourceLayer, const std::string &assetPath)> UsdUtilsResolveAssetPathFn
Callback function for overloaded version of UsdUtilsFlattenLayerStack.