20 #include "AL/usdmaya/ForwardDeclares.h"
21 #include "AL/maya/utils/Api.h"
22 #include "AL/maya/utils/MayaHelperMacros.h"
23 #include "maya/MDGModifier.h"
24 #include "maya/MObject.h"
25 #include "maya/MPxCommand.h"
28 #include "pxr/usd/usd/stage.h"
79 AL_MAYA_DECLARE_COMMAND();
81 bool isUndoable()
const override;
82 MStatus doIt(
const MArgList& args)
override;
94 UsdStageRefPtr m_stage;
95 SdfLayerHandle m_rootLayer;
96 SdfLayerRefPtr m_newLayer;
99 bool m_addSublayer =
false;
100 bool m_layerWasInserted;
103 AL_MAYA_DECLARE_COMMAND();
105 bool isUndoable()
const override;
106 MStatus undoIt()
override;
107 MStatus redoIt()
override;
108 MStatus doIt(
const MArgList& args)
override;
119 AL_MAYA_DECLARE_COMMAND();
121 bool isUndoable()
const override;
122 MStatus doIt(
const MArgList& args)
override;
133 AL_MAYA_DECLARE_COMMAND();
135 bool isUndoable()
const override;
136 MStatus doIt(
const MArgList& args)
override;
147 UsdEditTarget previous;
149 UsdStageRefPtr stage;
151 bool previouslyAnEditTarget;
152 std::function<std::string(SdfLayerHandle)> getLayerId;
155 AL_MAYA_DECLARE_COMMAND();
157 bool isUndoable()
const override;
158 MStatus doIt(
const MArgList& args)
override;
159 MStatus undoIt()
override;
160 MStatus redoIt()
override;
161 PcpNodeRef determineEditTargetMapping(UsdStageRefPtr stage,
const MArgDatabase& args, SdfLayerHandle editTargetLayer)
const;
171 SdfLayerHandle m_layer;
174 AL_MAYA_DECLARE_COMMAND();
176 bool isUndoable()
const override;
177 MStatus doIt(
const MArgList& args)
override;
178 MStatus undoIt()
override;
179 MStatus redoIt()
override;
190 AL_MAYA_DECLARE_COMMAND();
192 bool isUndoable()
const override;
193 MStatus doIt(
const MArgList& args)
override;
194 MStatus captureLayerContents(
const MString&
id, MStringArray& results);
Given some selected proxy shape node, return the layer names.
Definition: LayerCommands.h:75
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:244
Get / Set whether the layer is currently muted.
Definition: LayerCommands.h:168
Export a layer to the given filename.
Definition: LayerCommands.h:129
static MSyntax setUpCommonSyntax()
sets up some core/common command params for all the layer commands. Just specifies that selection can...
Given some selected or passed in proxy shape node, create a layer in maya parented to the layer match...
Definition: LayerCommands.h:91
Helper class.
Definition: LayerCommands.h:39
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
Command to introspect and pull out data from the layer manager.
Definition: LayerCommands.h:186
UsdStageRefPtr getShapeNodeStage(const MArgDatabase &args)
get the USD stage
Save the specified layer.
Definition: LayerCommands.h:115
AL_USDMAYA_PUBLIC void constructLayerCommandGuis()
function called on startup to generate the menu & option boxes for the layer commands ...
Get / Set the current edit target for the stage.
Definition: LayerCommands.h:143