Loading...
Searching...
No Matches
UsdImagingDataSourcePrim Class Reference

Data source representing a basic USD prim. More...

#include <dataSourcePrim.h>

+ Inheritance diagram for UsdImagingDataSourcePrim:

Public Member Functions

 HD_DECLARE_DATASOURCE (UsdImagingDataSourcePrim)
 
USDIMAGING_API TfTokenVector GetNames () override
 Returns the names for which this data source can return meaningful results.
 
USDIMAGING_API HdDataSourceBaseHandle Get (const TfToken &name) override
 Returns the data source representing name, if valid.
 
- Public Member Functions inherited from HdContainerDataSource
 HD_DECLARE_DATASOURCE_ABSTRACT (HdContainerDataSource)
 
virtual TfTokenVector GetNames ()=0
 Returns the list of names for which Get(...) is expected to return a non-null value.
 
virtual HdDataSourceBaseHandle Get (const TfToken &name)=0
 Returns the child datasource of the given name.
 

Static Public Member Functions

static USDIMAGING_API HdDataSourceLocatorSet Invalidate (UsdPrim const &prim, const TfToken &subprim, const TfTokenVector &properties, UsdImagingPropertyInvalidationType invalidationType)
 Returns the hydra attribute set we should invalidate if the value of the USD properties in properties change.
 
- Static Public Member Functions inherited from HdContainerDataSource
static HD_API HdDataSourceBaseHandle Get (const Handle &container, const HdDataSourceLocator &locator)
 A convenience function: given container, return the descendant identified by locator, which may be at any depth.
 

Protected Member Functions

USDIMAGING_API UsdImagingDataSourcePrim (const SdfPath &sceneIndexPath, UsdPrim usdPrim, const UsdImagingDataSourceStageGlobals &stageGlobals)
 Use to construct a new UsdImagingDataSourcePrim.
 
const SdfPath_GetSceneIndexPath () const
 
const UsdPrim_GetUsdPrim () const
 
const UsdImagingDataSourceStageGlobals_GetStageGlobals () const
 

Detailed Description

Data source representing a basic USD prim.

This class is meant to check for behaviors we might expect on all nodes of the scene, including interior nodes; e.g. xform, visibility. It's expected that concrete imaging types would derive from this and add imaging prim-related attributes.

Note: while every prim gets at least this datasource defined on it, this datasource tries to aggressively early out of attribute checks based on type information (IsA/HasA) or namespace-accelerated attribute checks.

Since a Usd prim can populate multiple imaging prims (e.g. /prim, /prim.a, /prim.b); and since the default prim path (/prim) is always populated; we drop inherited attributes on subprims (/prim.a), letting them inherit from /prim instead. This way we don't (e.g.) double-apply transforms.

Definition at line 446 of file dataSourcePrim.h.

Constructor & Destructor Documentation

◆ UsdImagingDataSourcePrim()

USDIMAGING_API UsdImagingDataSourcePrim ( const SdfPath sceneIndexPath,
UsdPrim  usdPrim,
const UsdImagingDataSourceStageGlobals stageGlobals 
)
protected

Use to construct a new UsdImagingDataSourcePrim.

sceneIndexPath is the path of this object in the scene index. (Note: this can be different than the usd path if one usd prim inserts multiple imaging prims).

usdPrim is the USD prim object that this data source represents.

stageGlobals represents the context object for the UsdStage with which to evaluate this attribute data source.

Note: client code calls this via static New().

Member Function Documentation

◆ _GetSceneIndexPath()

const SdfPath & _GetSceneIndexPath ( ) const
inlineprotected

Definition at line 491 of file dataSourcePrim.h.

◆ _GetStageGlobals()

const UsdImagingDataSourceStageGlobals & _GetStageGlobals ( ) const
inlineprotected

Definition at line 499 of file dataSourcePrim.h.

◆ _GetUsdPrim()

const UsdPrim & _GetUsdPrim ( ) const
inlineprotected

Definition at line 495 of file dataSourcePrim.h.

◆ Get()

USDIMAGING_API HdDataSourceBaseHandle Get ( const TfToken name)
overridevirtual

◆ GetNames()

◆ Invalidate()

static USDIMAGING_API HdDataSourceLocatorSet Invalidate ( UsdPrim const &  prim,
const TfToken subprim,
const TfTokenVector properties,
UsdImagingPropertyInvalidationType  invalidationType 
)
static

Returns the hydra attribute set we should invalidate if the value of the USD properties in properties change.


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