Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

PluginMain.cpp

00001 
00006 #include "SoftVolumeSphere.h"
00007 #include "SurfaceGenerator.h"
00008 
00009 #include <maya/MFnPlugin.h>
00010 
00011 #define EXPORT
00012 
00013 
00021 EXPORT MStatus initializePlugin( MObject obj )
00022 {
00023         MStatus stat;
00024         // use the plugin function set to register the new node type with maya.
00025         // can also provide the author of the plugin, the version number, and we
00026         // can also specify a required version of maya,"Any" good default
00027         //
00028         MFnPlugin fnPlugin( obj, "Hannes Ricklefs", "1.0", "Any");
00029 
00030         //register the softVolumeSphere
00031         stat = fnPlugin.registerNode( SoftVolumeSphere::typeName,
00032                                                                   SoftVolumeSphere::typeId,
00033                                                                   SoftVolumeSphere::creator,
00034                                                                   SoftVolumeSphere::initialize,
00035                                                                   MPxNode::kLocatorNode );
00036 
00037         // check for error
00038         if( stat != MS::kSuccess )
00039                 stat.perror( "could not register the SoftVolumeSphere node" );
00040 
00041         //register the SurfaceGenerator
00042     stat = fnPlugin.registerNode( SurfaceGenerator::typeName,
00043                                                                   SurfaceGenerator::typeId,
00044                                                                   SurfaceGenerator::creator,
00045                                                                   SurfaceGenerator::initialize,
00046                                                                   MPxNode::kDependNode );
00047 
00048         // check for error
00049         if( stat != MS::kSuccess )
00050                 stat.perror( "could not register the SurfaceGenerator node" );
00051 
00052 
00053 
00054 
00055         return stat;
00056 }
00058 
00066 EXPORT MStatus uninitializePlugin( MObject obj)
00067 {
00068         MStatus stat;
00069 
00070         // use the plugin function set to unload the plugin
00071         MFnPlugin fnPlugin( obj );
00072 
00073         
00074         // deregister the SoftVolumeSphereNode
00075         stat = fnPlugin.deregisterNode( SoftVolumeSphere::typeId );
00076 
00077         // check for error
00078         if( stat != MS::kSuccess )
00079                 stat.perror( "could not deregister the softVolumeSphere node" );
00080         
00081         //deregister the SurfaceGenerator
00082         stat = fnPlugin.deregisterNode( SurfaceGenerator::typeId );
00083 
00084         // check for error
00085         if( stat != MS::kSuccess )
00086                 stat.perror( "could not deregister the surfaceGenerator node" );
00087         
00088         
00089 
00090                 
00091         return stat;
00092 }

Generated on Mon Jun 13 03:18:00 2005 for ImplicitFunctions by  doxygen 1.4.1