Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sjirka authored Mar 9, 2017
1 parent 90edc60 commit fd6a2ad
Show file tree
Hide file tree
Showing 16 changed files with 2,852 additions and 0 deletions.
54 changes: 54 additions & 0 deletions PluginMain.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#include "SeamsEasyNode.h"
#include "SeamsEasyCmd.h"
#include "StitchEasyNode.h"
#include "StitchEasyCmd.h"
#include "StitchEasyCtxCmd.h"

#include <maya\MFnPlugin.h>

MStatus initializePlugin(MObject object) {
MStatus status;

MFnPlugin fnPlugin(object, "Stepan Jirka", "1.0", "Any", &status);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.registerNode("stitchEasy", StitchEasyNode::id, StitchEasyNode::creator, StitchEasyNode::initialize);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.registerNode("seamsEasy", SeamsEasyNode::id, SeamsEasyNode::creator, SeamsEasyNode::initialize);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.registerCommand("stitchEasy", StitchEasyCmd::creator, StitchEasyCmd::newSyntax);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.registerCommand("seamsEasy", SeamsEasyCmd::creator, SeamsEasyCmd::newSyntax);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.registerContextCommand("stitchEasyCtx", StitchEasyCtxCmd::creator);
CHECK_MSTATUS_AND_RETURN_IT(status);

return MS::kSuccess;
}

MStatus uninitializePlugin(MObject object) {
MStatus status;

MFnPlugin fnPlugin(object);

status = fnPlugin.deregisterContextCommand("stitchEasyCtx");
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.deregisterNode(StitchEasyNode::id);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.deregisterNode(SeamsEasyNode::id);
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.deregisterCommand("stitchEasy");
CHECK_MSTATUS_AND_RETURN_IT(status);

status = fnPlugin.deregisterCommand("seamsEasy");
CHECK_MSTATUS_AND_RETURN_IT(status);

return MS::kSuccess;
}
Loading

0 comments on commit fd6a2ad

Please sign in to comment.