2 #include "AL/usdmaya/Common.h"
4 #include "maya/MDGModifier.h"
5 #include "maya/MObject.h"
6 #include "maya/MPxCommand.h"
8 #include "pxr/usd/usd/stage.h"
46 MObject
getSelectedNode(
const MArgDatabase& args,
const MTypeId typeId);
57 AL_MAYA_DECLARE_COMMAND();
59 bool isUndoable()
const override;
60 MStatus doIt(
const MArgList& args)
override;
70 UsdStageRefPtr m_stage;
71 SdfLayerHandle m_rootLayer;
81 AL_MAYA_DECLARE_COMMAND();
83 bool isUndoable()
const override;
84 MStatus undoIt()
override;
85 MStatus redoIt()
override;
86 MStatus doIt(
const MArgList& args)
override;
97 AL_MAYA_DECLARE_COMMAND();
99 bool isUndoable()
const override;
100 MStatus doIt(
const MArgList& args)
override;
111 AL_MAYA_DECLARE_COMMAND();
113 bool isUndoable()
const override;
114 MStatus doIt(
const MArgList& args)
override;
125 UsdEditTarget previous;
127 UsdStageRefPtr stage;
130 bool previouslyAnEditTarget;
132 AL_MAYA_DECLARE_COMMAND();
134 bool isUndoable()
const override;
135 MStatus doIt(
const MArgList& args)
override;
136 MStatus undoIt()
override;
137 MStatus redoIt()
override;
138 PcpNodeRef determineEditTargetMapping(UsdStageRefPtr stage,
const MArgDatabase& args, SdfLayerHandle editTargetLayer)
const;
148 SdfLayerHandle m_layer;
151 AL_MAYA_DECLARE_COMMAND();
153 bool isUndoable()
const override;
154 MStatus doIt(
const MArgList& args)
override;
155 MStatus undoIt()
override;
156 MStatus redoIt()
override;
MObject getSelectedNode(const MArgDatabase &args, const MTypeId typeId)
hunt for the first node of the specified type found in the selection list object args ...
Given some selected proxy shape node, return the layer names.
Definition: LayerCommands.h:53
nodes::ProxyShape * getShapeNode(const MArgDatabase &args)
find the proxy shape node from a valid pre-parsed arg database
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
void constructLayerCommandGuis()
function called on startup to generate the menu & option boxes for the layer commands ...
Get / Set whether the layer is currently muted.
Definition: LayerCommands.h:145
Export a layer to the given filename.
Definition: LayerCommands.h:107
static MSyntax setUpCommonSyntax()
sets up some core/common command params for all the layer commands. Just specifies that selection can...
Helper class.
Definition: LayerCommands.h:17
MArgDatabase makeDatabase(const MArgList &args)
construct the arg data base from an args list. If any errors are found during parsing, an error will be thrown
UsdStageRefPtr getShapeNodeStage(const MArgDatabase &args)
get the USD stage
Save the specified layer.
Definition: LayerCommands.h:93
The layer node stores a reference to an SdfLayer.
Definition: Layer.h:20
Given some selected proxy shape node, create a new sub layer for the current edit target...
Definition: LayerCommands.h:67
Get / Set the current edit target for the stage.
Definition: LayerCommands.h:121