24#ifndef PXR_USD_USD_UTILS_AUTHORING_H
25#define PXR_USD_USD_UTILS_AUTHORING_H
34#include "pxr/base/tf/hashset.h"
38#include "pxr/usd/usdUtils/api.h"
41PXR_NAMESPACE_OPEN_SCOPE
63 const SdfLayerHandle &destination,
64 bool skipSublayers =
false,
65 bool bakeUnauthoredFallbacks =
false);
67using UsdUtilsPathHashSet = TfHashSet<SdfPath, SdfPath::Hash>;
120 const SdfPathSet &includedRootPaths,
121 const UsdStageWeakPtr &usdStage,
122 SdfPathVector *pathsToInclude,
123 SdfPathVector *pathsToExclude,
124 double minInclusionRatio=0.75,
125 const unsigned int maxNumExcludesBelowInclude=5u,
126 const unsigned int minIncludeExcludeCollectionSize=3u,
127 const UsdUtilsPathHashSet &pathsToIgnore=UsdUtilsPathHashSet());
140 const SdfPathVector &pathsToInclude,
141 const SdfPathVector &pathsToExclude=SdfPathVector());
186 const std::vector<std::pair<TfToken, SdfPathSet>> &assignments,
188 const double minInclusionRatio=0.75,
189 const unsigned int maxNumExcludesBelowInclude=5u,
190 const unsigned int minIncludeExcludeCollectionSize=3u);
197 bool includeClipLayers =
true);
199PXR_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.
This is a general purpose API schema, used to describe a collection of heterogeneous objects within t...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...