All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
stitch.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_USD_UTILS_STITCH_H
8#define PXR_USD_USD_UTILS_STITCH_H
9
16
17#include "pxr/pxr.h"
18#include "pxr/usd/usdUtils/api.h"
20#include "pxr/usd/sdf/spec.h"
21
22#include <functional>
23
24PXR_NAMESPACE_OPEN_SCOPE
25
26SDF_DECLARE_HANDLES(SdfLayer);
27
52USDUTILS_API
54 const SdfLayerHandle& strongLayer,
55 const SdfLayerHandle& weakLayer);
56
61USDUTILS_API
63 const SdfSpecHandle& strongObj,
64 const SdfSpecHandle& weakObj);
65
68
72{
76};
77
89using UsdUtilsStitchValueFn = std::function<
91 const TfToken& field, const SdfPath& path,
92 const SdfLayerHandle& strongLayer, bool fieldInStrongLayer,
93 const SdfLayerHandle& weakLayer, bool fieldInWeakLayer,
94 VtValue* stitchedValue)>;
95
100USDUTILS_API
102 const SdfLayerHandle& strongLayer,
103 const SdfLayerHandle& weakLayer,
104 const UsdUtilsStitchValueFn& stitchValueFn);
105
110USDUTILS_API
112 const SdfSpecHandle& strongObj,
113 const SdfSpecHandle& weakObj,
114 const UsdUtilsStitchValueFn& stitchValueFn);
115
117
118PXR_NAMESPACE_CLOSE_SCOPE
119
120#endif /* PXR_USD_USD_UTILS_STITCH_H */
A scene description container that can combine with other such containers to form simple component as...
Definition: layer.h:84
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
USDUTILS_API void UsdUtilsStitchInfo(const SdfSpecHandle &strongObj, const SdfSpecHandle &weakObj)
Merge the scene description for weakObj into strongObj.
USDUTILS_API void UsdUtilsStitchLayers(const SdfLayerHandle &strongLayer, const SdfLayerHandle &weakLayer)
Merge all scene description in weakLayer into strongLayer.
UsdUtilsStitchValueStatus
Status enum returned by UsdUtilsStitchValueFn describing the desired value stitching behavior.
Definition: stitch.h:72
@ UseDefaultValue
Use the default stitching behavior for this field.
@ NoStitchedValue
Don't stitch values for this field.
@ UseSuppliedValue
Use the value supplied in stitchedValue.
std::function< UsdUtilsStitchValueStatus(const TfToken &field, const SdfPath &path, const SdfLayerHandle &strongLayer, bool fieldInStrongLayer, const SdfLayerHandle &weakLayer, bool fieldInWeakLayer, VtValue *stitchedValue)> UsdUtilsStitchValueFn
Callback for customizing how values are stitched together.
Definition: stitch.h:94