splitUVMain.cpp

//-
// ==========================================================================
// Copyright 1995,2006,2008 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk
// license agreement provided at the time of installation or download,
// or which otherwise accompanies this software in either electronic
// or hard copy form.
// ==========================================================================
//+
 
// 
// File: pluginMain.cpp
//
// Author: Maya SDK Wizard
//

#include "splitUVCmd.h"
#include "splitUVNode.h"

#include <maya/MFnPlugin.h>

MStatus initializePlugin( MObject obj )
//
//      Description:
//              this method is called when the plug-in is loaded into Maya.  It 
//              registers all of the services that this plug-in provides with 
//              Maya.
//
//      Arguments:
//              obj - a handle to the plug-in object (use MFnPlugin to access it)
//
{ 
        MStatus   status;
        MFnPlugin plugin( obj, PLUGIN_COMPANY, "4.0", "Any");

        status = plugin.registerCommand( "splitUV", splitUV::creator );
        if (!status) {
                status.perror("registerCommand");
                return status;
        }

        status = plugin.registerNode( "splitUVNode",
                                                                  splitUVNode::id,
                                                                  splitUVNode::creator,
                                                                  splitUVNode::initialize );
        if (!status) {
                status.perror("registerNode");
                return status;
        }

        return status;
}

MStatus uninitializePlugin( MObject obj )
//
//      Description:
//              this method is called when the plug-in is unloaded from Maya. It 
//              deregisters all of the services that it was providing.
//
//      Arguments:
//              obj - a handle to the plug-in object (use MFnPlugin to access it)
//
{
        MStatus   status;
        MFnPlugin plugin( obj );

        status = plugin.deregisterCommand( "splitUV" );
        if (!status) {
                status.perror("deregisterCommand");
                return status;
        }

        status = plugin.deregisterNode( splitUVNode::id );
        if (!status) {
                status.perror("deregisterNode");
                return status;
        }

        return status;
}

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6