aboutsummaryrefslogtreecommitdiff
path: root/mayaPlug/shaveUtilCmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'mayaPlug/shaveUtilCmd.h')
-rw-r--r--mayaPlug/shaveUtilCmd.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/mayaPlug/shaveUtilCmd.h b/mayaPlug/shaveUtilCmd.h
new file mode 100644
index 0000000..2e8d6ba
--- /dev/null
+++ b/mayaPlug/shaveUtilCmd.h
@@ -0,0 +1,71 @@
+#ifndef shaveUtilCmd_h
+#define shaveUtilCmd_h
+
+// Shave and a Haircut
+// (c) 2019 Epic Games
+// US Patent 6720962
+
+#include <maya/MArgList.h>
+#include <maya/MPxCommand.h>
+#include <maya/MSyntax.h>
+#include <maya/MString.h>
+
+
+class shaveUtilCmd : public MPxCommand
+{
+public:
+ shaveUtilCmd();
+ virtual ~shaveUtilCmd();
+
+ MStatus doIt( const MArgList& args );
+ bool isUndoable() const;
+
+ static void* createCmd();
+ static MSyntax createSyntax();
+
+ static const MString commandName;
+
+private:
+
+ MStatus scaleAll(float s);
+ MStatus scaleCurrent(float s);
+
+ MStatus copyAttr(
+ MString origPlugName,
+ MString dupPlugName,
+ bool dupInConns,
+ bool moveOutConns
+ ) const;
+
+ MStatus copyInboundConnection(
+ MPlug& origPlug, MPlug& dupPlug
+ ) const;
+
+ MStatus copyPlug(
+ MPlug origPlug,
+ MPlug dupPlug,
+ bool dupInConns,
+ bool moveOutConns,
+ bool checkOnly
+ ) const;
+
+ static void finishPluginInitialization();
+ static MString getAttrType(MString plugName);
+
+ MStatus moveOutboundConnections(
+ MPlug& origPlug, MPlug& dupPlug
+ ) const;
+
+#ifdef PROFILE
+ static bool gProfiling;
+#endif
+ bool mForce;
+ bool mSilent;
+};
+
+
+inline bool shaveUtilCmd::isUndoable() const
+{ return false; }
+
+#endif
+