Loading...
Searching...
No Matches
HdxSelectionSceneIndexObserver Class Reference

Queries each prim of the given scene index for the HdSelectionsSchema to compute a HdSelection. More...

#include <selectionSceneIndexObserver.h>

+ Inheritance diagram for HdxSelectionSceneIndexObserver:

Public Member Functions

HDX_API void SetSceneIndex (HdSceneIndexBaseRefPtr const &sceneIndex)
 Set which scene index to query for selection.
 
HDX_API int GetVersion () const
 Increased every time the selection in the scene index gets dirtied (or a difference scene index is set).
 
HDX_API HdSelectionSharedPtr GetSelection ()
 Get the result of querying the scene index for the selection as HdSelection.
 
HDX_API void PrimsAdded (const HdSceneIndexBase &sender, const AddedPrimEntries &entries) override
 A notification indicating prims have been added to the scene.
 
HDX_API void PrimsDirtied (const HdSceneIndexBase &sender, const DirtiedPrimEntries &entries) override
 A notification indicating prim datasources have been invalidated.
 
HDX_API void PrimsRemoved (const HdSceneIndexBase &sender, const RemovedPrimEntries &entries) override
 A notification indicating prims have been removed from the scene.
 
HDX_API void PrimsRenamed (const HdSceneIndexBase &sender, const RenamedPrimEntries &entries) override
 A notification indicating prims (and their descendants) have been renamed or reparented.
 
virtual HD_API void PrimsAdded (const HdSceneIndexBase &sender, const AddedPrimEntries &entries)=0
 A notification indicating prims have been added to the scene.
 
virtual HD_API void PrimsRemoved (const HdSceneIndexBase &sender, const RemovedPrimEntries &entries)=0
 A notification indicating prims have been removed from the scene.
 
virtual HD_API void PrimsDirtied (const HdSceneIndexBase &sender, const DirtiedPrimEntries &entries)=0
 A notification indicating prim datasources have been invalidated.
 
virtual HD_API void PrimsRenamed (const HdSceneIndexBase &sender, const RenamedPrimEntries &entries)=0
 A notification indicating prims (and their descendants) have been renamed or reparented.
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Additional Inherited Members

- Public Types inherited from HdSceneIndexObserver
using AddedPrimEntries = TfSmallVector< AddedPrimEntry, 16 >
 
using RemovedPrimEntries = TfSmallVector< RemovedPrimEntry, 16 >
 
using DirtiedPrimEntries = TfSmallVector< DirtiedPrimEntry, 16 >
 
using RenamedPrimEntries = TfSmallVector< RenamedPrimEntry, 16 >
 
- Static Public Member Functions inherited from HdSceneIndexObserver
static HD_API void ConvertPrimsRenamedToRemovedAndAdded (const HdSceneIndexBase &sender, const HdSceneIndexObserver::RenamedPrimEntries &renamedEntries, HdSceneIndexObserver::RemovedPrimEntries *outputRemovedEntries, HdSceneIndexObserver::AddedPrimEntries *outputAddedEntries)
 A utility for converting prims renamed messages into equivalent removed and added notices.
 
static HD_API void ConvertPrimsRenamedToRemovedAndAdded (const HdSceneIndexBase &sender, const HdSceneIndexObserver::RenamedPrimEntries &renamedEntries, HdSceneIndexObserver *observer)
 A utility for converting prims renamed messages into equivalent removed and added notices at the observer level.
 
- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Queries each prim of the given scene index for the HdSelectionsSchema to compute a HdSelection.

Definition at line 39 of file selectionSceneIndexObserver.h.

Member Function Documentation

◆ GetSelection()

HDX_API HdSelectionSharedPtr GetSelection ( )

Get the result of querying the scene index for the selection as HdSelection.

◆ GetVersion()

HDX_API int GetVersion ( ) const

Increased every time the selection in the scene index gets dirtied (or a difference scene index is set).

◆ PrimsAdded()

HDX_API void PrimsAdded ( const HdSceneIndexBase sender,
const AddedPrimEntries entries 
)
overridevirtual

A notification indicating prims have been added to the scene.

The set of scene prims compiled from added/removed notices should match the set from a traversal based on sender.GetChildPrimNames. Each prim has a path and type. It's possible for PrimsAdded to be called for prims that already exist; in that case, observers should be sure to update the prim type, in case it changed, and resync the prim. This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ PrimsDirtied()

HDX_API void PrimsDirtied ( const HdSceneIndexBase sender,
const DirtiedPrimEntries entries 
)
overridevirtual

A notification indicating prim datasources have been invalidated.

This message is not considered hierarchical on primPath; if /Path is dirtied, /Path/child is not necessarily dirtied. However datasource locators are considered hierarchical: if primvars is dirtied on a prim, primvars/color is considered dirtied as well. This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ PrimsRemoved()

HDX_API void PrimsRemoved ( const HdSceneIndexBase sender,
const RemovedPrimEntries entries 
)
overridevirtual

A notification indicating prims have been removed from the scene.

Note that this message is considered hierarchical; if /Path is removed, /Path/child is considered removed as well. This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ PrimsRenamed()

HDX_API void PrimsRenamed ( const HdSceneIndexBase sender,
const RenamedPrimEntries entries 
)
overridevirtual

A notification indicating prims (and their descendants) have been renamed or reparented.

This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ SetSceneIndex()

HDX_API void SetSceneIndex ( HdSceneIndexBaseRefPtr const &  sceneIndex)

Set which scene index to query for selection.


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