20 #include "AL/maya/utils/NodeHelper.h"
22 #include "pxr/usd/usd/stage.h"
24 #include "maya/MPxLocatorNode.h"
25 #include "maya/MNodeMessage.h"
26 #include "AL/maya/utils/MayaHelperMacros.h"
30 PXR_NAMESPACE_USING_DIRECTIVE
45 public AL::maya::utils::NodeHelper
51 : MPxNode(), NodeHelper() {}
65 static MObject
findOrCreateNode(MDGModifier* dgmod=
nullptr,
bool* wasCreated=
nullptr);
113 static MObject _findNode();
114 static void onAttributeChanged(MNodeMessage::AttributeMessage, MPlug&, MPlug&,
void*);
117 void addAttributeChangedCallback();
120 void removeAttributeChangedCallback();
122 MCallbackId m_attributeChanged = 0;
124 static TfTokenVector m_rendererPluginsTokens;
125 static MStringArray m_rendererPluginsNames;
131 void postConstructor()
override;
133 bool setInternalValueInContext(
const MPlug& plug,
const MDataHandle& dataHandle, MDGContext& ctx)
override;
135 bool getInternalValueInContext(
const MPlug& plug, MDataHandle& dataHandle, MDGContext& ctx)
override;
AL_MAYA_DECLARE_NODE()
Type Info & Registration.
void onRendererChanged()
Methods to handle renderer plugin.
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
static MObject findOrCreateNode(MDGModifier *dgmod=nullptr, bool *wasCreated=nullptr)
Either find the already-existing non-referenced RendererManager node in the scene, or make one.
int getRendererPluginIndex() const
Get current renderer plugin index.
The layer manager node handles serialization and deserialization of all layers used by all ProxyShape...
Definition: RendererManager.h:43
bool setRendererPlugin(const MString &pluginName)
Set current renderer plugin based on provided name.
AL_DECL_ATTRIBUTE(rendererPluginName)
Type Info & Registration.
static const MStringArray & getRendererPluginList()
Get list of available Hydra renderer plugin names.
Definition: RendererManager.h:96
static RendererManager * findOrCreateManager(MDGModifier *dgmod=nullptr, bool *wasCreated=nullptr)
Either find the already-existing non-referenced RendererManager in the scene, or make one...
static MObject findNode()
Find the already-existing non-referenced RendererManager node in the scene, or return a null MObject...
static RendererManager * findManager()
Find the already-existing non-referenced RendererManager node in the scene, or return a nullptr...
void changeRendererPlugin(ProxyShape *proxy, bool creation=false)
Change current renderer plugin for provided ProxyShape.
RendererManager()
ctor
Definition: RendererManager.h:50