7#ifndef PXR_USD_USD_UTILS_AUTHORING_H
8#define PXR_USD_USD_UTILS_AUTHORING_H
17#include "pxr/base/tf/hashset.h"
21#include "pxr/usd/usdUtils/api.h"
24PXR_NAMESPACE_OPEN_SCOPE
46 const SdfLayerHandle &destination,
47 bool skipSublayers =
false,
48 bool bakeUnauthoredFallbacks =
false);
50using UsdUtilsPathHashSet = TfHashSet<SdfPath, SdfPath::Hash>;
103 const SdfPathSet &includedRootPaths,
104 const UsdStageWeakPtr &usdStage,
105 SdfPathVector *pathsToInclude,
106 SdfPathVector *pathsToExclude,
107 double minInclusionRatio=0.75,
108 const unsigned int maxNumExcludesBelowInclude=5u,
109 const unsigned int minIncludeExcludeCollectionSize=3u,
110 const UsdUtilsPathHashSet &pathsToIgnore=UsdUtilsPathHashSet());
123 const SdfPathVector &pathsToInclude,
124 const SdfPathVector &pathsToExclude=SdfPathVector());
169 const std::vector<std::pair<TfToken, SdfPathSet>> &assignments,
171 const double minInclusionRatio=0.75,
172 const unsigned int maxNumExcludesBelowInclude=5u,
173 const unsigned int minIncludeExcludeCollectionSize=3u);
180 bool includeClipLayers =
true);
182PXR_NAMESPACE_CLOSE_SCOPE
USDUTILS_API std::vector< UsdCollectionAPI > UsdUtilsCreateCollections(const std::vector< std::pair< TfToken, SdfPathSet > > &assignments, const UsdPrim &usdPrim, const double minInclusionRatio=0.75, const unsigned int maxNumExcludesBelowInclude=5u, const unsigned int minIncludeExcludeCollectionSize=3u)
Given a vector of (collection-name, path-set) pairs, assignments, creates and returns a vector of col...
USDUTILS_API UsdCollectionAPI UsdUtilsAuthorCollection(const TfToken &collectionName, const UsdPrim &usdPrim, const SdfPathVector &pathsToInclude, const SdfPathVector &pathsToExclude=SdfPathVector())
Authors a collection named collectionName on the given prim, usdPrim with the given set of included p...
USDUTILS_API bool UsdUtilsCopyLayerMetadata(const SdfLayerHandle &source, const SdfLayerHandle &destination, bool skipSublayers=false, bool bakeUnauthoredFallbacks=false)
Given two layers source and destination, copy the authored metadata from one to the other.
USDUTILS_API bool UsdUtilsComputeCollectionIncludesAndExcludes(const SdfPathSet &includedRootPaths, const UsdStageWeakPtr &usdStage, SdfPathVector *pathsToInclude, SdfPathVector *pathsToExclude, double minInclusionRatio=0.75, const unsigned int maxNumExcludesBelowInclude=5u, const unsigned int minIncludeExcludeCollectionSize=3u, const UsdUtilsPathHashSet &pathsToIgnore=UsdUtilsPathHashSet())
Computes the optimal set of paths to include and the set of paths to exclude below includes paths,...
USDUTILS_API SdfLayerHandleVector UsdUtilsGetDirtyLayers(UsdStagePtr stage, bool includeClipLayers=true)
Retrieve a list of all dirty layers from the stage's UsedLayers.
A scene description container that can combine with other such containers to form simple component as...
Token for efficient comparison, assignment, and hashing of known strings.
A general purpose API schema used to describe a collection of prims and properties within a scene.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...