20 #include "maya/MPxDrawOverride.h"
21 #include "AL/usdmaya/ForwardDeclares.h"
24 #include "pxr/usdImaging/usdImaging/version.h"
26 #include "AL/usd/utils/ForwardDeclares.h"
27 #if (USD_IMAGING_API_VERSION >= 7)
28 # include "pxr/usdImaging/usdImagingGL/hdEngine.h"
30 # include "pxr/usdImaging/usdImaging/hdEngine.h"
33 PXR_NAMESPACE_USING_DIRECTIVE
45 :
public MHWRender::MPxDrawOverride
60 static MHWRender::MPxDrawOverride*
creator(
const MObject& obj);
67 const MDagPath& objPath,
68 const MDagPath& cameraPath)
const override;
75 const MDagPath& objPath,
76 const MDagPath& cameraPath)
const override;
85 const MDagPath& objPath,
86 const MDagPath& cameraPath,
87 const MHWRender::MFrameContext& frameContext,
88 MUserData* oldData)
override;
102 static void draw(
const MHWRender::MDrawContext& context,
const MUserData* data);
113 {
return MHWRender::kOpenGL | MHWRender::kOpenGLCoreProfile; }
115 #if MAYA_API_VERSION >= 201700
116 bool excludedFromPostEffects()
const override
123 static MUint64 s_lastRefreshFrameStamp;
125 #if MAYA_API_VERSION >= 20190000
126 bool wantUserSelection()
const override {
return true;}
129 const MHWRender::MSelectionInfo& selectInfo,
130 const MHWRender::MDrawContext& context,
131 const MDagPath& objPath,
132 const MUserData* data,
133 MSelectionList& selectionList,
134 MPointArray& worldSpaceHitPts)
override;
A custom proxy shape node that attaches itself to a USD file, and then renders it. The stage is held internally as a member variable, and it will be composed based on a change to the "filePath" attribute.
Definition: ProxyShape.h:244
MBoundingBox boundingBox(const MDagPath &objPath, const MDagPath &cameraPath) const override
Called by Maya whenever the bounding box of the drawable object is needed.
static AL_USDMAYA_PUBLIC MString kDrawRegistrantId
draw registration id for this override
Definition: ProxyDrawOverride.h:96
static AL_USDMAYA_PUBLIC MString kDrawDbClassification
draw classification string for this override
Definition: ProxyDrawOverride.h:92
static AL_USDMAYA_PUBLIC MHWRender::MPxDrawOverride * creator(const MObject &obj)
static creator method
MUserData * prepareForDraw(const MDagPath &objPath, const MDagPath &cameraPath, const MHWRender::MFrameContext &frameContext, MUserData *oldData) override
Called by Maya whenever the object is dirty and needs to update for draw.
This class provides the draw override for the USD proxy shape node.
Definition: ProxyDrawOverride.h:44
MHWRender::DrawAPI supportedDrawAPIs() const override
We support the legacy and VP2 core profile rendering.
Definition: ProxyDrawOverride.h:112
bool isBounded(const MDagPath &objPath, const MDagPath &cameraPath) const override
Called by Maya to determine if the drawable object is bounded or not.
static AL_USDMAYA_PUBLIC void draw(const MHWRender::MDrawContext &context, const MUserData *data)
The draw callback, performs the actual rendering for the draw override.
static AL_USDMAYA_PUBLIC ProxyShape * getShape(const MDagPath &objPath)
utility function to get a pointer to the proxy shape node given the specified path ...
ProxyDrawOverride(const MObject &obj)
ctor