![]() |
|
Abstracts pieces necessary for implementing a Hydra Scene Debugger in a manner convenient for exposing to python. More...
#include <hydraObserver.h>
Classes | |
| struct | NoticeEntry |
| Aggregate of HdSceneIndexObserver entry types for easier binding to python. More... | |
Public Types | |
| using | IndexList = std::vector< size_t > |
| using | NoticeEntryVector = std::vector< NoticeEntry > |
Public Member Functions | |
| USDVIEWQ_API bool | TargetToNamedSceneIndex (const std::string &name) |
| Target this observer to a scene index with the given name previously registered via HdSceneIndexNameRegistry. | |
| USDVIEWQ_API bool | TargetToInputSceneIndex (const IndexList &inputIndices) |
Starting from the currently targeted HdSceneIndex, each value in the inputIndices is treated as an index into the result of HdFilteringSceneIndexBase::GetInputScenes. | |
| USDVIEWQ_API std::string | GetDisplayName () |
| Returns the display name of the actively targeted scene index. | |
| USDVIEWQ_API std::vector< std::string > | GetInputDisplayNames (const IndexList &inputIndices) |
Starting from the currently targeted HdSceneIndex, each value in the inputIndices is treated as an index into the result of HdFilteringSceneIndexBase::GetInputScenes. | |
| USDVIEWQ_API std::vector< std::string > | GetNestedInputDisplayNames () |
| Recurses through all input scene indices and lists them all by display name. | |
| USDVIEWQ_API bool | TargetToNestedInputSceneIndex (size_t nestedInputIndex) |
| Given an index into GetNestedInputDisplayNames(), sets the corresponding scene index as targeted HdSceneIndex. | |
| USDVIEWQ_API SdfPathVector | GetChildPrimPaths (const SdfPath &primPath) |
Returns the paths of the immediate children of the specified primPath for the actively observer scene index. | |
| USDVIEWQ_API HdSceneIndexPrim | GetPrim (const SdfPath &primPath) |
Returns the prim type and data source for the specified primPath for the actively observer scene index. | |
| USDVIEWQ_API bool | HasPendingNotices () |
| Returns true if there are pending scene change notices. | |
| USDVIEWQ_API NoticeEntryVector | GetPendingNotices () |
| Returns (and clears) any accumulated scene change notices. | |
| USDVIEWQ_API void | ClearPendingNotices () |
| Clears any accumulated scene change notices. | |
Static Public Member Functions | |
| static USDVIEWQ_API std::vector< std::string > | GetRegisteredSceneIndexNames () |
| Returns the names of scene indices previously registered with HdSceneIndexNameRegistry. | |
Abstracts pieces necessary for implementing a Hydra Scene Debugger in a manner convenient for exposing to python.
For C++ code, this offers no benefits over directly implementing an HdSceneIndexObserver. It exists solely in service of the python implementation of Hydra Scene Debugger present in usdview.
See extras/imaging/examples/hdui for an example of a C++ direct implementation.
Definition at line 29 of file hydraObserver.h.
| using IndexList = std::vector<size_t> |
Definition at line 52 of file hydraObserver.h.
| using NoticeEntryVector = std::vector<NoticeEntry> |
Definition at line 125 of file hydraObserver.h.
| USDVIEWQ_API void ClearPendingNotices | ( | ) |
Clears any accumulated scene change notices.
| USDVIEWQ_API SdfPathVector GetChildPrimPaths | ( | const SdfPath & | primPath | ) |
Returns the paths of the immediate children of the specified primPath for the actively observer scene index.
| USDVIEWQ_API std::string GetDisplayName | ( | ) |
Returns the display name of the actively targeted scene index.
This display name is currently derived from the C++ typename.
| USDVIEWQ_API std::vector< std::string > GetInputDisplayNames | ( | const IndexList & | inputIndices | ) |
Starting from the currently targeted HdSceneIndex, each value in the inputIndices is treated as an index into the result of HdFilteringSceneIndexBase::GetInputScenes.
If the scene index reached is a subclass of HdFilteringSceneIndexBase, the display names of the return value of GetInputScenes is returned. Otherwise, the return value is empty.
| USDVIEWQ_API std::vector< std::string > GetNestedInputDisplayNames | ( | ) |
Recurses through all input scene indices and lists them all by display name.
Includes targeted scene index itself.
| USDVIEWQ_API NoticeEntryVector GetPendingNotices | ( | ) |
Returns (and clears) any accumulated scene change notices.
Consumers of this follow a polling rather than callback pattern.
| USDVIEWQ_API HdSceneIndexPrim GetPrim | ( | const SdfPath & | primPath | ) |
Returns the prim type and data source for the specified primPath for the actively observer scene index.
|
static |
Returns the names of scene indices previously registered with HdSceneIndexNameRegistry.
It allows a browser to retrieve available instances without direct interaction with the application.
| USDVIEWQ_API bool HasPendingNotices | ( | ) |
Returns true if there are pending scene change notices.
Consumers of this follow a polling rather than callback pattern.
| USDVIEWQ_API bool TargetToInputSceneIndex | ( | const IndexList & | inputIndices | ) |
Starting from the currently targeted HdSceneIndex, each value in the inputIndices is treated as an index into the result of HdFilteringSceneIndexBase::GetInputScenes.
Returns true if each followed index maps to a valid index into the input scenes of the previous.
| USDVIEWQ_API bool TargetToNamedSceneIndex | ( | const std::string & | name | ) |
Target this observer to a scene index with the given name previously registered via HdSceneIndexNameRegistry.
| USDVIEWQ_API bool TargetToNestedInputSceneIndex | ( | size_t | nestedInputIndex | ) |
Given an index into GetNestedInputDisplayNames(), sets the corresponding scene index as targeted HdSceneIndex.
Returns false, if index was out of bounds.