2 #include "AL/usdmaya/Common.h"
3 #include "maya/MPxDrawOverride.h"
5 #include "pxr/usdImaging/usdImaging/version.h"
6 #if (USD_IMAGING_API_VERSION >= 7)
7 # include "pxr/usdImaging/usdImagingGL/hdEngine.h"
9 # include "pxr/usdImaging/usdImaging/hdEngine.h"
21 :
public MHWRender::MPxDrawOverride
35 static MHWRender::MPxDrawOverride*
creator(
const MObject& obj);
42 const MDagPath& objPath,
43 const MDagPath& cameraPath)
const override;
50 const MDagPath& objPath,
51 const MDagPath& cameraPath)
const override;
60 const MDagPath& objPath,
61 const MDagPath& cameraPath,
62 const MHWRender::MFrameContext& frameContext,
63 MUserData* oldData)
override;
74 static void draw(
const MHWRender::MDrawContext& context,
const MUserData* data);
85 return MHWRender::kOpenGL | MHWRender::kOpenGLCoreProfile;
static MString kDrawRegistrantId
draw registration id for this override
Definition: ProxyDrawOverride.h:69
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:33
MBoundingBox boundingBox(const MDagPath &objPath, const MDagPath &cameraPath) const override
Called by Maya whenever the bounding box of the drawable object is needed.
static ProxyShape * getShape(const MDagPath &objPath)
utility function to get a pointer to the proxy shape node given the specified path ...
static MString kDrawDbClassification
draw classification string for this override
Definition: ProxyDrawOverride.h:66
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:20
MHWRender::DrawAPI supportedDrawAPIs() const override
We support the legacy and VP2 core profile rendering.
Definition: ProxyDrawOverride.h:83
bool isBounded(const MDagPath &objPath, const MDagPath &cameraPath) const override
Called by Maya to determine if the drawable object is bounded or not.
static MHWRender::MPxDrawOverride * creator(const MObject &obj)
static creator method
ProxyDrawOverride(const MObject &obj)
ctor
static void draw(const MHWRender::MDrawContext &context, const MUserData *data)
The draw callback, performs the actual rendering for the draw override.