HDK
|
#include <hydraObserver.h>
Classes | |
struct | NoticeEntry |
Public Types | |
using | IndexList = std::vector< size_t > |
using | NoticeEntryVector = std::vector< NoticeEntry > |
Public Member Functions | |
USDVIEWQ_API | UsdviewqHydraObserver ()=default |
USDVIEWQ_API | ~UsdviewqHydraObserver () |
USDVIEWQ_API bool | TargetToNamedSceneIndex (const std::string &name) |
USDVIEWQ_API bool | TargetToInputSceneIndex (const IndexList &inputIndices) |
USDVIEWQ_API std::string | GetDisplayName () |
USDVIEWQ_API std::vector < std::string > | GetInputDisplayNames (const IndexList &inputIndices) |
USDVIEWQ_API SdfPathVector | GetChildPrimPaths (const SdfPath &primPath) |
USDVIEWQ_API HdSceneIndexPrim | GetPrim (const SdfPath &primPath) |
USDVIEWQ_API bool | HasPendingNotices () |
USDVIEWQ_API NoticeEntryVector | GetPendingNotices () |
USDVIEWQ_API void | ClearPendingNotices () |
Clears any accumulated scene change notices. More... | |
Static Public Member Functions | |
static USDVIEWQ_API std::vector< std::string > | GetRegisteredSceneIndexNames () |
Abstracts pieces necessary for implementing a Hydra Scene Browser 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 Browser present in usdview.
See extras/imaging/examples/hdui for an example of a C++ direct implementation.
Definition at line 45 of file hydraObserver.h.
using UsdviewqHydraObserver::IndexList = std::vector<size_t> |
Definition at line 68 of file hydraObserver.h.
using UsdviewqHydraObserver::NoticeEntryVector = std::vector<NoticeEntry> |
Definition at line 129 of file hydraObserver.h.
|
default |
USDVIEWQ_API UsdviewqHydraObserver::~UsdviewqHydraObserver | ( | ) |
USDVIEWQ_API void UsdviewqHydraObserver::ClearPendingNotices | ( | ) |
Clears any accumulated scene change notices.
USDVIEWQ_API SdfPathVector UsdviewqHydraObserver::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 UsdviewqHydraObserver::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> UsdviewqHydraObserver::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 NoticeEntryVector UsdviewqHydraObserver::GetPendingNotices | ( | ) |
Returns (and clears) any accumulated scene change notices. Consumers of this follow a polling rather than callback pattern.
USDVIEWQ_API HdSceneIndexPrim UsdviewqHydraObserver::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 UsdviewqHydraObserver::HasPendingNotices | ( | ) |
Returns true if there are pending scene change notices. Consumers of this follow a polling rather than callback pattern.
USDVIEWQ_API bool UsdviewqHydraObserver::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 UsdviewqHydraObserver::TargetToNamedSceneIndex | ( | const std::string & | name | ) |
Target this observer to a scene index with the given name previously registered via HdSceneIndexNameRegistry