1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 //
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_PCP_CACHE_H
25 #define PXR_USD_PCP_CACHE_H
27 #include "pxr/pxr.h"
28 #include "pxr/usd/pcp/api.h"
29 #include "pxr/usd/pcp/dependency.h"
30 #include "pxr/usd/pcp/errors.h"
31 #include "pxr/usd/pcp/mapFunction.h"
32 #include "pxr/usd/pcp/primIndex.h"
33 #include "pxr/usd/pcp/propertyIndex.h"
35 #include "pxr/usd/sdf/path.h"
36 #include "pxr/usd/sdf/pathTable.h"
38 #include "pxr/usd/ar/ar.h"
41 #include "pxr/base/tf/functionRef.h"
42 #include "pxr/base/tf/hashset.h"
44 #include <memory>
45 #include <string>
46 #include <unordered_set>
47 #include <vector>
51 // Forward declarations:
52 class PcpChanges;
53 class PcpCacheChanges;
54 class Pcp_Dependencies;
56 class PcpLifeboat;
57 class PcpNodeRef;
58 class PcpMapFunction;
61 TF_DECLARE_WEAK_AND_REF_PTRS(Pcp_LayerStackRegistry);
93 class PcpCache
94 {
95  PcpCache(PcpCache const &) = delete;
96  PcpCache &operator=(PcpCache const &) = delete;
97 public:
108  PCP_API
109  PcpCache(const PcpLayerStackIdentifier & layerStackIdentifier,
110  const std::string& fileFormatTarget = std::string(),
111  bool usd = false);
112  PCP_API ~PcpCache();
118  PCP_API
127  PCP_API
128  PcpLayerStackPtr GetLayerStack() const;
134  bool HasRootLayerStack(PcpLayerStackRefPtr const &layerStack) const {
135  return layerStack == _layerStack;
136  }
139  PCP_API
140  bool HasRootLayerStack(PcpLayerStackPtr const &layerStack) const;
143  PCP_API
144  bool IsUsd() const;
147  PCP_API
148  const std::string& GetFileFormatTarget() const;
152  PCP_API
161  PCP_API
162  void SetVariantFallbacks( const PcpVariantFallbackMap & map,
163  PcpChanges* changes = NULL );
166  PCP_API
167  bool IsPayloadIncluded(const SdfPath &path) const;
170  using PayloadSet = std::unordered_set<SdfPath, SdfPath::Hash>;
171  PCP_API
172  PayloadSet const &GetIncludedPayloads() const;
185  PCP_API
186  void RequestPayloads( const SdfPathSet & pathsToInclude,
187  const SdfPathSet & pathsToExclude,
188  PcpChanges* changes = NULL );
218  PCP_API
219  void RequestLayerMuting(const std::vector<std::string>& layersToMute,
220  const std::vector<std::string>& layersToUnmute,
221  PcpChanges* changes = nullptr,
222  std::vector<std::string>* newLayersMuted = nullptr,
223  std::vector<std::string>* newLayersUnmuted =
224  nullptr);
229  PCP_API
230  const std::vector<std::string>& GetMutedLayers() const;
237  PCP_API
238  bool IsLayerMuted(const std::string& layerIdentifier) const;
247  PCP_API
248  bool IsLayerMuted(const SdfLayerHandle& anchorLayer,
249  const std::string& layerIdentifier,
250  std::string* canonicalMutedLayerIdentifier
251  = nullptr) const;
255  PCP_API
268  PCP_API
269  PcpLayerStackRefPtr
270  ComputeLayerStack(const PcpLayerStackIdentifier &identifier,
271  PcpErrorVector *allErrors);
275  PCP_API
276  PcpLayerStackPtr
277  FindLayerStack(const PcpLayerStackIdentifier &identifier) const;
281  PCP_API
282  bool UsesLayerStack(const PcpLayerStackPtr &layerStack) const;
287  PCP_API
288  const PcpPrimIndex &
289  ComputePrimIndex(const SdfPath &primPath, PcpErrorVector *allErrors);
313  template <class ChildrenPredicate, class PayloadPredicate>
315  PcpErrorVector *allErrors,
316  const ChildrenPredicate &childrenPred,
317  const PayloadPredicate &payloadPred) {
318  ComputePrimIndexesInParallel(SdfPathVector(1, path), allErrors,
319  childrenPred, payloadPred,
320  "Pcp", "ComputePrimIndexesInParallel");
321  }
326  template <class ChildrenPredicate, class PayloadPredicate>
328  PcpErrorVector *allErrors,
329  const ChildrenPredicate &childrenPred,
330  const PayloadPredicate &payloadPred,
331  const char *mallocTag1,
332  const char *mallocTag2) {
333  ComputePrimIndexesInParallel(SdfPathVector(1, path), allErrors,
334  childrenPred, payloadPred,
335  mallocTag1, mallocTag2);
336  }
340  template <class ChildrenPredicate, class PayloadPredicate>
341  void ComputePrimIndexesInParallel(const SdfPathVector &paths,
342  PcpErrorVector *allErrors,
343  const ChildrenPredicate &childrenPred,
344  const PayloadPredicate &payloadPred) {
345  _UntypedIndexingChildrenPredicate cp(&childrenPred);
346  _UntypedIndexingPayloadPredicate pp(&payloadPred);
347  _ComputePrimIndexesInParallel(paths, allErrors, cp, pp,
348  "Pcp", "ComputePrimIndexesInParallel");
349  }
354  template <class ChildrenPredicate, class PayloadPredicate>
355  void ComputePrimIndexesInParallel(const SdfPathVector &paths,
356  PcpErrorVector *allErrors,
357  const ChildrenPredicate &childrenPred,
358  const PayloadPredicate &payloadPred,
359  const char *mallocTag1,
360  const char *mallocTag2) {
361  _UntypedIndexingChildrenPredicate cp(&childrenPred);
362  _UntypedIndexingPayloadPredicate pp(&payloadPred);
363  _ComputePrimIndexesInParallel(paths, allErrors, cp, pp,
364  mallocTag1, mallocTag2);
365  }
369  PCP_API
370  const PcpPrimIndex *
371  FindPrimIndex(const SdfPath &primPath) const;
375  template <class Callback>
376  void
377  ForEachPrimIndex(const Callback& callback) const
378  {
379  TfFunctionRef<void(const PcpPrimIndex&)> fn(callback);
380  _ForEachPrimIndex(fn);
381  }
386  PCP_API
387  const PcpPropertyIndex &
388  ComputePropertyIndex(const SdfPath &propPath, PcpErrorVector *allErrors);
392  PCP_API
393  const PcpPropertyIndex *
394  FindPropertyIndex(const SdfPath &propPath) const;
405  PCP_API
406  void
407  ComputeRelationshipTargetPaths(const SdfPath &relationshipPath,
408  SdfPathVector *paths,
409  bool localOnly,
410  const SdfSpecHandle &stopProperty,
411  bool includeStopProperty,
412  SdfPathVector *deletedPaths,
413  PcpErrorVector *allErrors);
424  PCP_API
425  void
426  ComputeAttributeConnectionPaths(const SdfPath &attributePath,
427  SdfPathVector *paths,
428  bool localOnly,
429  const SdfSpecHandle &stopProperty,
430  bool includeStopProperty,
431  SdfPathVector *deletedPaths,
432  PcpErrorVector *allErrors);
439  PCP_API
440  SdfLayerHandleSet GetUsedLayers() const;
447  PCP_API
448  size_t GetUsedLayersRevision() const;
451  PCP_API
452  SdfLayerHandleSet GetUsedRootLayers() const;
455  PCP_API
456  const PcpLayerStackPtrVector&
457  FindAllLayerStacksUsingLayer(const SdfLayerHandle& layer) const;
462  template <class Callback>
463  void
464  ForEachLayerStack(const Callback& callback) const
465  {
466  TfFunctionRef<void(const PcpLayerStackPtr&)> fn(callback);
467  _ForEachLayerStack(fn);
468  }
483  PCP_API
484  PcpDependencyVector
485  FindSiteDependencies(const PcpLayerStackPtr& siteLayerStack,
486  const SdfPath& sitePath,
487  PcpDependencyFlags depMask,
488  bool recurseOnSite,
489  bool recurseOnIndex,
490  bool filterForExistingCachesOnly) const;
501  PCP_API
502  PcpDependencyVector
503  FindSiteDependencies(const SdfLayerHandle& siteLayer,
504  const SdfPath& sitePath,
505  PcpDependencyFlags depMask,
506  bool recurseOnSite,
507  bool recurseOnIndex,
508  bool filterForExistingCachesOnly) const;
518  PCP_API
519  bool CanHaveOpinionForSite(const SdfPath& localPcpSitePath,
520  const SdfLayerHandle& layer,
521  SdfPath* allowedPathInLayer) const;
525  PCP_API
526  std::vector<std::string> GetInvalidSublayerIdentifiers() const;
532  PCP_API
533  bool IsInvalidSublayerIdentifier(const std::string& identifier) const;
537  PCP_API
538  std::map<SdfPath, std::vector<std::string>, SdfPath::FastLessThan>
539  GetInvalidAssetPaths() const;
545  PCP_API
546  bool IsInvalidAssetPath(const std::string& resolvedAssetPath) const;
550  PCP_API
555  PCP_API
561  PCP_API
562  bool IsPossibleDynamicFileFormatArgumentField(const TfToken &field) const;
567  PCP_API
569  const TfToken &attributeName) const;
575  PCP_API
578  const SdfPath &primIndexPath) const;
604  PCP_API
605  void Apply(const PcpCacheChanges& changes, PcpLifeboat* lifeboat);
613  PCP_API
614  void Reload(PcpChanges* changes);
627  PCP_API
628  void ReloadReferences(PcpChanges* changes, const SdfPath& primPath);
636  PCP_API
637  void PrintStatistics() const;
641 private:
642  friend class PcpChanges;
643  friend class Pcp_Dependencies;
644  friend class Pcp_Statistics;
646  struct _ParallelIndexer;
648  // Helper struct to type-erase a children predicate for the duration of
649  // ComputePrimIndexesInParallel.
650  //
651  // This lets us achieve two goals. First, clients may pass any arbitrary
652  // type as a predicate (e.g. they do not have to derive some base class).
653  // Second, it lets us keep the parallel indexing implementation in the .cpp
654  // file, avoiding any large template code instantiation.
655  //
656  // The cost we pay is this very thin indirect call. We instantiate a
657  // function template with the client's predicate type that simply does a
658  // typecast and predicate invocation, and pass that function pointer into
659  // the implementation. There is no heap allocation, no predicate copy, no
660  // argument marshalling, etc.
661  struct _UntypedIndexingChildrenPredicate {
662  _UntypedIndexingChildrenPredicate() : pred(nullptr), invoke(nullptr) {}
663  template <class Pred>
664  explicit _UntypedIndexingChildrenPredicate(const Pred *pred)
665  : pred(pred), invoke(_Invoke<Pred>) {}
667  inline bool operator()(const PcpPrimIndex &index,
668  TfTokenVector *childNamesToCompose) const {
669  return invoke(pred, index, childNamesToCompose);
670  }
671  private:
672  template <class Pred>
673  static bool _Invoke(const void *pred, const PcpPrimIndex &index,
674  TfTokenVector *namesToCompose) {
675  return (*static_cast<const Pred *>(pred))(index, namesToCompose);
676  }
677  const void *pred;
678  bool (*invoke)(const void *, const PcpPrimIndex &, TfTokenVector *);
679  };
681  // See doc for _UntypedIndexingChildrenPredicate above. This does the same
682  // for the payload inclusion predicate.
683  struct _UntypedIndexingPayloadPredicate {
684  template <class Pred>
685  explicit _UntypedIndexingPayloadPredicate(const Pred *pred)
686  : pred(pred), invoke(_Invoke<Pred>) {}
688  inline bool operator()(const SdfPath &path) const {
689  return invoke(pred, path);
690  }
691  private:
692  template <class Pred>
693  static bool _Invoke(const void *pred, const SdfPath &path) {
694  return (*static_cast<const Pred *>(pred))(path);
695  }
696  const void *pred;
697  bool (*invoke)(const void *, const SdfPath &);
698  };
700  // Internal helper for recursive indexing.
701  const PcpPrimIndex &
702  _ComputePrimIndexWithCompatibleInputs(
703  const SdfPath & path, const PcpPrimIndexInputs &inputs,
704  PcpErrorVector *allErrors);
706  // Friend to allow low-level indexing code access to the above.
707  friend const PcpPrimIndex &
708  Pcp_ComputePrimIndexWithCompatibleInputs(
709  PcpCache &cache,
710  const SdfPath & path, const PcpPrimIndexInputs &inputs,
711  PcpErrorVector *allErrors);
713  // Parallel indexing implementation.
714  PCP_API
715  void _ComputePrimIndexesInParallel(
716  const SdfPathVector &paths,
717  PcpErrorVector *allErrors,
718  _UntypedIndexingChildrenPredicate childrenPred,
719  _UntypedIndexingPayloadPredicate payloadPred,
720  const char *mallocTag1,
721  const char *mallocTag2);
723  void _RemovePrimCache(const SdfPath& primPath, PcpLifeboat* lifeboat);
724  void _RemovePrimAndPropertyCaches(const SdfPath& root,
725  PcpLifeboat* lifeboat);
726  void _RemovePropertyCache(const SdfPath& root, PcpLifeboat* lifeboat);
727  void _RemovePropertyCaches(const SdfPath& root, PcpLifeboat* lifeboat);
729  // Returns the prim index for \p path if it exists, NULL otherwise.
730  PcpPrimIndex* _GetPrimIndex(const SdfPath& path);
731  const PcpPrimIndex* _GetPrimIndex(const SdfPath& path) const;
733  // Returns the property index for \p path if it exists, NULL otherwise.
734  PcpPropertyIndex* _GetPropertyIndex(const SdfPath& path);
735  const PcpPropertyIndex* _GetPropertyIndex(const SdfPath& path) const;
737  PCP_API
738  void _ForEachPrimIndex(
739  const TfFunctionRef<void(const PcpPrimIndex&)>& fn) const;
741  PCP_API
742  void _ForEachLayerStack(
743  const TfFunctionRef<void(const PcpLayerStackPtr&)>& fn) const;
745 private:
746  // Fixed evaluation parameters, set when the cache is created. Note that
747  // _rootLayer and _sessionLayer are not const because we want to mutate them
748  // to enable parallel teardown in the destructor.
749  SdfLayerRefPtr _rootLayer;
750  SdfLayerRefPtr _sessionLayer;
751  const PcpLayerStackIdentifier _layerStackIdentifier;
753  // Flag that configures PcpCache to use the restricted set of USD features.
754  // Currently it governs whether relocates, inherits, permissions,
755  // symmetry, or payloads are considered, and whether the prim stack
756  // is populated and its depdencies gathered during computation of
757  // prim indices and composition of prim child names.
758  const bool _usd;
760  // File format target for all scene description layers this cache will
761  // find or open during prim index computation.
762  const std::string _fileFormatTarget;
764  // The layer stack for this cache. Holding this by ref ptr means we
765  // hold all of our local layers by ref ptr (including the root and
766  // session layers, again).
767  PcpLayerStackRefPtr _layerStack;
769  // Modifiable evaluation parameters.
770  // Anything that changes these should also yield a PcpChanges
771  // value describing the necessary cache invalidation.
772  PayloadSet _includedPayloads;
773  PcpVariantFallbackMap _variantFallbackMap;
775  // Cached computation types.
776  typedef Pcp_LayerStackRegistryRefPtr _LayerStackCache;
777  typedef SdfPathTable<PcpPrimIndex> _PrimIndexCache;
778  typedef SdfPathTable<PcpPropertyIndex> _PropertyIndexCache;
780  // Cached computations.
781  _LayerStackCache _layerStackCache;
782  _PrimIndexCache _primIndexCache;
783  _PropertyIndexCache _propertyIndexCache;
784  std::unique_ptr<Pcp_Dependencies> _primDependencies;
786  // Parallel indexer state.
787  std::unique_ptr<_ParallelIndexer> _parallelIndexer;
788 };
792 #endif // PXR_USD_PCP_CACHE_H
void ComputePrimIndexesInParallel(const SdfPath &path, PcpErrorVector *allErrors, const ChildrenPredicate &childrenPred, const PayloadPredicate &payloadPred)
Compute PcpPrimIndexes in the subtree rooted at path in parallel, recursing to children based on the ...
Definition: cache.h:314
PCP_API bool CanHaveOpinionForSite(const SdfPath &localPcpSitePath, const SdfLayerHandle &layer, SdfPath *allowedPathInLayer) const
Returns true if an opinion for the site at localPcpSitePath in the cache's layer stack can be provide...
PCP_API bool IsInvalidAssetPath(const std::string &resolvedAssetPath) const
Returns true if resolvedAssetPath was used by a prim (e.g.
PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific...
Definition: primIndex.h:76
PCP_API const PcpPrimIndex & ComputePrimIndex(const SdfPath &primPath, PcpErrorVector *allErrors)
Compute and return a reference to the cached result for the prim index for the given path.
Standard pointer typedefs.
PCP_API PcpPrimIndexInputs GetPrimIndexInputs()
Returns parameter object containing all inputs for the prim index computation used by this cache.
Represents a stack of layers that contribute opinions to composition.
Definition: layerStack.h:65
void ForEachLayerStack(const Callback &callback) const
Run the given callbcack on every layer stack used by prim indexes in the cache.
Definition: cache.h:464
void ComputePrimIndexesInParallel(const SdfPathVector &paths, PcpErrorVector *allErrors, const ChildrenPredicate &childrenPred, const PayloadPredicate &payloadPred, const char *mallocTag1, const char *mallocTag2)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: cache.h:355
Describes Pcp changes.
Definition: changes.h:172
PCP_API const PcpDynamicFileFormatDependencyData & GetDynamicFileFormatArgumentDependencyData(const SdfPath &primIndexPath) const
Returns the dynamic file format dependency data object for the prim index with the given primIndexPat...
PcpNode represents a node in an expression tree for compositing scene description.
Definition: node.h:67
PCP_API void Apply(const PcpCacheChanges &changes, PcpLifeboat *lifeboat)
Apply the changes in changes.
PcpCache is the context required to make requests of the Pcp composition algorithm and cache the resu...
Definition: cache.h:93
Base class for all Sdf spec classes.
Definition: spec.h:52
PCP_API void RequestLayerMuting(const std::vector< std::string > &layersToMute, const std::vector< std::string > &layersToUnmute, PcpChanges *changes=nullptr, std::vector< std::string > *newLayersMuted=nullptr, std::vector< std::string > *newLayersUnmuted=nullptr)
Request layers to be muted or unmuted in this cache.
PCP_API bool IsLayerMuted(const std::string &layerIdentifier) const
Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise.
PCP_API PcpLayerStackPtr GetLayerStack() const
Get the layer stack for GetLayerStackIdentifier().
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:89
PCP_API SdfLayerHandleSet GetUsedRootLayers() const
Returns set of all root layers used by this cache.
bool HasRootLayerStack(PcpLayerStackRefPtr const &layerStack) const
Return true if this cache's root layer stack is layerStack, false otherwise.
Definition: cache.h:134
This class provides a non-owning reference to a type-erased callable object with a specified signatur...
Definition: functionRef.h:36
void ForEachPrimIndex(const Callback &callback) const
Run the given callback on every prim index in the cache.
Definition: cache.h:377
PCP_API std::vector< std::string > GetInvalidSublayerIdentifiers() const
Returns a vector of sublayer asset paths used in the layer stack that didn't resolve to valid assets.
PCP_API PcpDependencyVector FindSiteDependencies(const PcpLayerStackPtr &siteLayerStack, const SdfPath &sitePath, PcpDependencyFlags depMask, bool recurseOnSite, bool recurseOnIndex, bool filterForExistingCachesOnly) const
Returns dependencies on the given site of scene description, as discovered by the cached index comput...
PCP_API const PcpPropertyIndex & ComputePropertyIndex(const SdfPath &propPath, PcpErrorVector *allErrors)
Compute and return a reference to the cached result for the property index for the given path.
void ComputePrimIndexesInParallel(const SdfPathVector &paths, PcpErrorVector *allErrors, const ChildrenPredicate &childrenPred, const PayloadPredicate &payloadPred)
Vectorized form of ComputePrimIndexesInParallel().
Definition: cache.h:341
PCP_API bool IsPossibleDynamicFileFormatArgumentAttribute(const TfToken &attributeName) const
Returns true if the given attributeName is the name of an attribute whose default value field was com...
PCP_API const PcpPrimIndex * FindPrimIndex(const SdfPath &primPath) const
Returns a pointer to the cached computed prim index for the given path, or NULL if it has not been co...
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
PCP_API void ComputeAttributeConnectionPaths(const SdfPath &attributePath, SdfPathVector *paths, bool localOnly, const SdfSpecHandle &stopProperty, bool includeStopProperty, SdfPathVector *deletedPaths, PcpErrorVector *allErrors)
Compute the attribute connection paths for the attribute at attributePath into paths.
Inputs for the prim indexing procedure.
Definition: primIndex.h:339
PCP_API SdfLayerHandleSet GetUsedLayers() const
Returns set of all layers used by this cache.
PCP_API PcpLayerStackPtr FindLayerStack(const PcpLayerStackIdentifier &identifier) const
Returns the layer stack for identifier if it has been computed and cached, otherwise returns NULL.
std::unordered_set< SdfPath, SdfPath::Hash > PayloadSet
Returns the payloads requested for inclusion.
Definition: cache.h:170
PCP_API void ComputeRelationshipTargetPaths(const SdfPath &relationshipPath, SdfPathVector *paths, bool localOnly, const SdfSpecHandle &stopProperty, bool includeStopProperty, SdfPathVector *deletedPaths, PcpErrorVector *allErrors)
Compute the relationship target paths for the relationship at relationshipPath into paths.
PCP_API bool IsInvalidSublayerIdentifier(const std::string &identifier) const
Returns true if identifier was used as a sublayer path in a layer stack but did not identify a valid ...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
PCP_API bool UsesLayerStack(const PcpLayerStackPtr &layerStack) const
Return true if layerStack is used by this cache in its composition, false otherwise.
A function that maps values from one namespace (and time domain) to another.
Definition: mapFunction.h:80
PCP_API const std::string & GetFileFormatTarget() const
Returns the file format target this cache is configured for.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
PCP_API const PcpLayerStackPtrVector & FindAllLayerStacksUsingLayer(const SdfLayerHandle &layer) const
Returns every computed & cached layer stack that includes layer.
PCP_API bool IsPossibleDynamicFileFormatArgumentField(const TfToken &field) const
Returns true if the given field is the name of a field that was composed while generating dynamic fil...
PCP_API std::map< SdfPath, std::vector< std::string >, SdfPath::FastLessThan > GetInvalidAssetPaths() const
Returns a map of prim paths to asset paths used by that prim (e.g.
Types of changes per cache.
Definition: changes.h:96
PCP_API void ReloadReferences(PcpChanges *changes, const SdfPath &primPath)
Reload every layer used by the prim at primPath that's across a reference or payload.
PCP_API bool IsPayloadIncluded(const SdfPath &path) const
Return true if the payload is included for the given path.
PCP_API size_t GetUsedLayersRevision() const
Return a number that can be used to determine whether or not the set of layers used by this cache may...
PCP_API const PcpPropertyIndex * FindPropertyIndex(const SdfPath &propPath) const
Returns a pointer to the cached computed property index for the given path, or NULL if it has not bee...
PCP_API PcpVariantFallbackMap GetVariantFallbacks() const
Get the list of fallbacks to attempt to use when evaluating variant sets that lack an authored select...
PCP_API void PrintStatistics() const
Prints various statistics about the data stored in this cache.
PCP_API const PcpLayerStackIdentifier & GetLayerStackIdentifier() const
Get the identifier of the layerStack used for composition.
PCP_API PcpLayerStackRefPtr ComputeLayerStack(const PcpLayerStackIdentifier &identifier, PcpErrorVector *allErrors)
Returns the layer stack for identifier if it exists, otherwise creates a new layer stack for identifi...
PCP_API void Reload(PcpChanges *changes)
Reload the layers of the layer stack, except session layers and sublayers of session layers.
PCP_API void RequestPayloads(const SdfPathSet &pathsToInclude, const SdfPathSet &pathsToExclude, PcpChanges *changes=NULL)
Request payloads to be included or excluded from composition.
PCP_API bool HasAnyDynamicFileFormatArgumentAttributeDependencies() const
Returns true if any prim index in this cache has a dependency on a dynamic file format argument attri...
PcpPropertyIndex is an index of all sites in scene description that contribute opinions to a specific...
Definition: propertyIndex.h:65
void ComputePrimIndexesInParallel(const SdfPath &path, PcpErrorVector *allErrors, const ChildrenPredicate &childrenPred, const PayloadPredicate &payloadPred, const char *mallocTag1, const char *mallocTag2)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: cache.h:327
PCP_API const std::vector< std::string > & GetMutedLayers() const
Returns the list of canonical identifiers for muted layers in this cache.
PCP_API void SetVariantFallbacks(const PcpVariantFallbackMap &map, PcpChanges *changes=NULL)
Set the list of fallbacks to attempt to use when evaluating variant sets that lack an authored select...
Structure used to temporarily retain layers and layerStacks within a code block.
Definition: changes.h:140
PCP_API bool HasAnyDynamicFileFormatArgumentFieldDependencies() const
Returns true if any prim index in this cache has a dependency on a dynamic file format argument field...
PCP_API bool IsUsd() const
Return true if the cache is configured in Usd mode.
std::map< std::string, std::vector< std::string > > PcpVariantFallbackMap
typedef std::map<std::string, std::vector<std::string>> PcpVariantFallbackMap
Definition: types.h:188
Contains the necessary information for storing a prim index's dependency on dynamic file format argum...
Arguments used to identify a layer stack.