Skip to content

Instantly share code, notes, and snippets.

@whaison
Created January 15, 2017 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whaison/3d06328596b03d62d78c55357de58d94 to your computer and use it in GitHub Desktop.
Save whaison/3d06328596b03d62d78c55357de58d94 to your computer and use it in GitHub Desktop.
MayaPluginWizard3Cmd.cpp Maya2017 Visual Studio2015
//
// Copyright (C) whaison2
//
// File: MayaPluginWhaison2Cmd.cpp
//
// MEL Command: MayaPluginWhaison2
//
// Author: Maya Plug-in Wizard 2.0
//
// Includes everything needed to register a simple MEL command with Maya.
//
#include <maya/MSimple.h>
#include <maya/MGlobal.h>
// Use helper macro to register a command with Maya. It creates and
// registers a command that does not support undo or redo. The
// created class derives off of MPxCommand.
//
DeclareSimpleCommand(MayaPluginWhaison2, "whaison2", "2017");
MStatus MayaPluginWhaison2::doIt(const MArgList& args)
//
// Description:
// implements the MEL MayaPluginWhaison2 command.
//
// Arguments:
// args - the argument list that was passes to the command from MEL
//
// Return Value:
// MS::kSuccess - command succeeded
// MS::kFailure - command failed (returning this value will cause the
// MEL script that is being run to terminate unless the
// error is caught using a "catch" statement.
//
{
MStatus stat = MS::kSuccess;
// Since this class is derived off of MPxCommand, you can use the
// inherited methods to return values and set error messages
//
//setResult( "MayaPluginWhaison2 command executed!\n" );
MGlobal::displayInfo("HelloWorld \n ");
return stat;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment