Loading...
Searching...
No Matches
UsdPrimCompositionQuery Class Reference

Object for making optionally filtered composition queries about a prim. More...

#include <primCompositionQuery.h>

Classes

struct  Filter
 Aggregate filter for filtering composition arcs by the previously defined criteria. More...
 

Public Types

enum class  ArcTypeFilter {
  All = 0 , Reference , Payload , Inherit ,
  Specialize , Variant , ReferenceOrPayload , InheritOrSpecialize ,
  NotReferenceOrPayload , NotInheritOrSpecialize , NotVariant
}
 Choices for filtering composition arcs based on arc type. More...
 
enum class  DependencyTypeFilter { All = 0 , Direct , Ancestral }
 Choices for filtering composition arcs on dependency type. More...
 
enum class  ArcIntroducedFilter { All = 0 , IntroducedInRootLayerStack , IntroducedInRootLayerPrimSpec }
 Choices for filtering composition arcs based on where the arc is introduced. More...
 
enum class  HasSpecsFilter { All = 0 , HasSpecs , HasNoSpecs }
 Choices for filtering composition arcs on whether the node contributes specs to the prim. More...
 

Public Member Functions

USD_API UsdPrimCompositionQuery (const UsdPrim &prim, const Filter &filter=Filter())
 Create a prim composition query for the with the given option filter.
 
USD_API void SetFilter (const Filter &filter)
 Change the filter for this query.
 
USD_API Filter GetFilter () const
 Return a copy of the current filter parameters.
 
USD_API std::vector< UsdPrimCompositionQueryArcGetCompositionArcs ()
 Return a list of composition arcs for this query's prim using the current query filter.
 

Static Public Member Functions

static USD_API UsdPrimCompositionQuery GetDirectReferences (const UsdPrim &prim)
 Returns a prim composition query for the given prim with a preset filter that only returns reference arcs that are not ancestral.
 
static USD_API UsdPrimCompositionQuery GetDirectInherits (const UsdPrim &prim)
 Returns a prim composition query for the given prim with a preset filter that only returns inherit arcs that are not ancestral.
 
static USD_API UsdPrimCompositionQuery GetDirectRootLayerArcs (const UsdPrim &prim)
 Returns a prim composition query for the given prim with a preset filter that only returns direct arcs that were introduced by opinions defined in a layer in the root layer stack.
 

Detailed Description

Object for making optionally filtered composition queries about a prim.

It creates a list of strength ordering UsdPrimCompositionQueryArc that can be filtered by a combination of criteria and returned.

Invalidation

This object does not listen for change notification. If a consumer is holding on to a UsdPrimCompositionQuery, it is their responsibility to dispose of it in response to a resync change to the associated prim. Failing to do so may result in incorrect values or crashes due to dereferencing invalid objects.

Definition at line 277 of file primCompositionQuery.h.

Member Enumeration Documentation

◆ ArcIntroducedFilter

enum class ArcIntroducedFilter
strong

Choices for filtering composition arcs based on where the arc is introduced.


Definition at line 315 of file primCompositionQuery.h.

◆ ArcTypeFilter

enum class ArcTypeFilter
strong

Choices for filtering composition arcs based on arc type.

Definition at line 281 of file primCompositionQuery.h.

◆ DependencyTypeFilter

enum class DependencyTypeFilter
strong

Choices for filtering composition arcs on dependency type.

This can be direct (arc introduced at the prim's level in namespace) or ancestral (arc introduced by a namespace parent of the prim).

Definition at line 305 of file primCompositionQuery.h.

◆ HasSpecsFilter

enum class HasSpecsFilter
strong

Choices for filtering composition arcs on whether the node contributes specs to the prim.

Definition at line 330 of file primCompositionQuery.h.

Constructor & Destructor Documentation

◆ UsdPrimCompositionQuery()

USD_API UsdPrimCompositionQuery ( const UsdPrim prim,
const Filter filter = Filter() 
)

Create a prim composition query for the with the given option filter.

Member Function Documentation

◆ GetCompositionArcs()

USD_API std::vector< UsdPrimCompositionQueryArc > GetCompositionArcs ( )

Return a list of composition arcs for this query's prim using the current query filter.

The composition arcs are always returned in order from strongest to weakest regardless of the filter.

◆ GetDirectInherits()

static USD_API UsdPrimCompositionQuery GetDirectInherits ( const UsdPrim prim)
static

Returns a prim composition query for the given prim with a preset filter that only returns inherit arcs that are not ancestral.

◆ GetDirectReferences()

static USD_API UsdPrimCompositionQuery GetDirectReferences ( const UsdPrim prim)
static

Returns a prim composition query for the given prim with a preset filter that only returns reference arcs that are not ancestral.

◆ GetDirectRootLayerArcs()

static USD_API UsdPrimCompositionQuery GetDirectRootLayerArcs ( const UsdPrim prim)
static

Returns a prim composition query for the given prim with a preset filter that only returns direct arcs that were introduced by opinions defined in a layer in the root layer stack.

◆ GetFilter()

USD_API Filter GetFilter ( ) const

Return a copy of the current filter parameters.

◆ SetFilter()

USD_API void SetFilter ( const Filter filter)

Change the filter for this query.


The documentation for this class was generated from the following file: