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

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

#include <stageData.h>

Classes

class  ListenerBase
 The base class for listeners defined by clients in order to be notified of scene changes. More...
 

Public Types

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

Public Member Functions

ESFUSD_API void Unregister (const ListenerBase *listener)
 Notifies that listener no longer needs to be informed of changes.
 

Static Public Member Functions

static ESFUSD_API std::shared_ptr< EsfUsdStageDataRegisterStage (const UsdStageConstPtr &stage, const ListenerBase *listener)
 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 54 of file stageData.h.

Member Typedef Documentation

◆ ChangedPathSet

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

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

Definition at line 63 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,
const ListenerBase listener 
)
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.

listener will be notified of scene changes.

◆ Unregister()

ESFUSD_API void Unregister ( const ListenerBase listener)

Notifies that listener no longer needs to be informed of changes.


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