24 #ifndef PXRUSDMAYAGL_INSTANCER_IMAGER_H
25 #define PXRUSDMAYAGL_INSTANCER_IMAGER_H
29 #include "pxrUsdMayaGL/api.h"
32 #include "pxr/base/tf/singleton.h"
33 #include "pxr/base/tf/weakBase.h"
38 #include <maya/MCallbackIdArray.h>
39 #include <maya/MDagMessage.h>
41 PXR_NAMESPACE_OPEN_SCOPE
74 struct _InstancerEntry {
75 MCallbackIdArray callbacks;
80 std::unique_ptr<UsdMayaGL_InstancerShapeAdapter> adapterVp2;
81 std::unique_ptr<UsdMayaGL_InstancerShapeAdapter> adapterLegacy;
102 MObjectHandle _cachedHdImagingShape;
108 static void _OnNodeDirty(
115 static void _OnWorldMatrixChanged(
116 MObject &transformNode,
117 MDagMessage::MatrixModifiedFlags& modified,
126 void _SyncShapeAdapters(
128 const unsigned int vp2DisplayStyle,
129 const M3dView::DisplayStyle legacyDisplayStyle);
135 void _DirtyHdImagingShape(
bool createIfNeeded);
142 void _StartTrackingInstancer(
const MObject& instancer);
144 void _StopTrackingInstancer(
const MObjectHandle& instancerHandle);
157 void _OnDisconnection(
165 friend class TfSingleton<UsdMayaGL_InstancerImager>;
168 PXR_NAMESPACE_CLOSE_SCOPE
Manage a single instance of an object (see.
Notice sent when any reference assembly is connected as a prototype of a native Maya instancer...
Notice sent when any reference assembly was previously a prototype of a native Maya instancer but has...
Notice sent when the Maya scene resets, either by opening a new scene or switching to a new scene...
Class for syncing native Maya instancers with the pxrHdImagingShape so that it can draw USD reference...
std::unordered_map< MObjectHandle, V, _HashObjectHandle > MObjectHandleUnorderedMap
Unordered mapping of Maya object handles to an arbitrary type.
void RemoveShapeAdapters(bool vp2)
Destroys all shape adapters for currently tracked instancers, but does not stop tracking the instance...
void SyncShapeAdapters(const unsigned int displayStyle)
Sync all dirty instancer shape adapters for Viewport 2.0.
std::unordered_set< MObjectHandle, _HashObjectHandle > MObjectHandleUnorderedSet
Unordered set of Maya object handles.
Enable a concrete base class for use with TfWeakPtr.