Loading...
Searching...
No Matches
EsfUsdStageData Class Reference

Class that holds data that is cached per-stage. More...

#include <stageData.h>

Public Types

using ChangedPathSet = tbb::concurrent_unordered_set< SdfPath, TfHash >
 A concurent set of paths, used to indicate the set of targets for which incoming connections have changed.
 

Public Member Functions

ESFUSD_API void UpdateForChangedAttributeConnections (const SdfPath &attrPath, ChangedPathSet *incomingConnectionsChanged)
 Updates attribute connection caches for connections owned by the attribute at attrPath.
 
ESFUSD_API void UpdateForResync (const SdfPath &resyncedPath, ChangedPathSet *incomingConnectionsChanged)
 Updates attribute connection caches for connections owned by attribute at or under resyncedPath.
 

Static Public Member Functions

static ESFUSD_API std::shared_ptr< EsfUsdStageDataRegisterStage (const UsdStageConstPtr &stage)
 Registers stage as a stage for which cached data should be held, returning a strong reference the client must hold until the cached data is no longer needed.
 
static ESFUSD_API EsfUsdStageDataGetStageData (const UsdStageConstPtr &stage)
 Get the cached stage data for stage.
 
static ESFUSD_API const SdfPathVector & GetOutgoingConnections (const UsdStageConstPtr &stage, const SdfPath &attrPath)
 Returns the paths of all objects that are targets of connections owned by the attribute at attrPath.
 
static ESFUSD_API SdfPathVector GetIncomingConnections (const UsdStageConstPtr &stage, const SdfPath &targetPath)
 Returns the paths of all attributes that own connections that target the object at targetPath.
 

Detailed Description

Class that holds data that is cached per-stage.

Note
It's unfortunate that clients that access outgoing and incoming connections using this class have to provide a stage pointer, making the implementation of this class less performant and more complicated. Ideally, EsfUsd objects would have a way to get directly to the stage data for their stage, but given the fact that those objects are all short-lived, it's not clear how to do that, at least without growing the sizes of all Esf objects.

Definition at line 51 of file stageData.h.

Member Typedef Documentation

◆ ChangedPathSet

using ChangedPathSet = tbb::concurrent_unordered_set<SdfPath, TfHash>

A concurent set of paths, used to indicate the set of targets for which incoming connections have changed.

Definition at line 83 of file stageData.h.

Member Function Documentation

◆ GetIncomingConnections()

static ESFUSD_API SdfPathVector GetIncomingConnections ( const UsdStageConstPtr &  stage,
const SdfPath targetPath 
)
static

Returns the paths of all attributes that own connections that target the object at targetPath.

◆ GetOutgoingConnections()

static ESFUSD_API const SdfPathVector & GetOutgoingConnections ( const UsdStageConstPtr &  stage,
const SdfPath attrPath 
)
static

Returns the paths of all objects that are targets of connections owned by the attribute at attrPath.

◆ GetStageData()

static ESFUSD_API EsfUsdStageData & GetStageData ( const UsdStageConstPtr &  stage)
static

Get the cached stage data for stage.

Note
The client calling this method must first have registered stage by calling RegisterStage and must still be holding the strong reference to the stage data while calling this method and using the returned reference.

◆ RegisterStage()

static ESFUSD_API std::shared_ptr< EsfUsdStageData > RegisterStage ( const UsdStageConstPtr &  stage)
static

Registers stage as a stage for which cached data should be held, returning a strong reference the client must hold until the cached data is no longer needed.

◆ UpdateForChangedAttributeConnections()

ESFUSD_API void UpdateForChangedAttributeConnections ( const SdfPath attrPath,
ChangedPathSet incomingConnectionsChanged 
)

Updates attribute connection caches for connections owned by the attribute at attrPath.

Populates incomingConnectionsChanged with the paths of objects whose incoming connection paths have changed.

◆ UpdateForResync()

ESFUSD_API void UpdateForResync ( const SdfPath resyncedPath,
ChangedPathSet incomingConnectionsChanged 
)

Updates attribute connection caches for connections owned by attribute at or under resyncedPath.


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