HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdUtils Namespace Reference

Classes

class  RenderInstanceTracker
 

Functions

RenderInstanceTracker facility below provides a simple way

A simple facility to associate an application object managed by std::shared_ptr with a render instance id.

This is useful when using the scene index callback registration facility. The callback is registered only once, but may be invoked each time the scene index graph is created (this currently happens during the render index construction). Futhermore, an application may spawn several render index instances and thus the (same) callback may be invoked several times, necessitating a way to map the callback back to the associated scene index instance.

The to register, unregister and query an object that is tied to a render instance id, which is provided as a callback argument.

Note
The RegisterInstance method should be invoked before the scene index callback is invoked (i.e., prior to render index construction).

The UnregisterInstance method is typically invoked prior to render index destruction.

Note
This facility isn't thread-safe.
See Also
HdSceneIndexPluginRegistry::SceneIndexAppendCallback
HdSceneIndexPluginRegistry::RegisterSceneIndexForRenderer
HD_API bool HasActiveRenderSettingsPrim (const HdSceneIndexBaseRefPtr &si, SdfPath *primPath=nullptr)
 

Function Documentation

HD_API bool HdUtils::HasActiveRenderSettingsPrim ( const HdSceneIndexBaseRefPtr &  si,
SdfPath primPath = nullptr 
)

Retreives the active render settings prim path from the input scene index si. Returns true if a data source for the associated locator was found with the result in primPath, and false otherwise.