Exemplo n.º 1
0
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 pluginFn( obj, PLUGIN_COMPANY, "1.0", "Any");

	// Add plug-in feature registration here
	//
	// Maya DG Nodes
	//
	status = pluginFn.registerNode( "particleAttr",
									particleAttrNode::id,
									particleAttrNode::creator,
									particleAttrNode::initialize,
									MPxNode::kParticleAttributeMapperNode );
	if( !status )
		status.perror("Register particleAttr node failed.");

	MGlobal::displayInfo("particleAttrNode loaded.");

	return status;
}
Exemplo n.º 2
0
MStatus uninitializePlugin(MObject plugin)
{
    MStatus     st;
    MFnPlugin   pluginFn(plugin, "Autodesk, Inc.", "1.0", "Any", &st);
    if (!st) {
        MGlobal::displayError(
            MString("helixQtCmd - could not uninitialize plugin: ")
            + st.errorString()
            );
        return st;
    }
    //  Make sure that there is no UI left hanging around.
    HelixQtCmd::cleanup();
    //  Deregister the command.
    st = pluginFn.deregisterCommand(HelixQtCmd::commandName);
    if (!st) {
        MGlobal::displayError(
            MString("helixQtCmd - could not deregister '")
            + HelixQtCmd::commandName + "' command: "
            + st.errorString()
            );
        return st;
    }
    return st;
}
Exemplo n.º 3
0
//-----------------------------------------------------------------------------
//
// Purpose: Entry point that Maya calls when this plugin is loaded into Maya
// Input  : The Maya MObject representing the plugin
// Output : MStatus::kSuccess if everything went ok, MStatus::kFailure otherwise
//
//-----------------------------------------------------------------------------
EXPORT MStatus initializePlugin( MObject mObject )
{
	MStatus regVal;
	MStatus retVal;

	MFnPlugin pluginFn( mObject, "Valve", "1.0", "Any" );

	return CVsMayaMPxFactoryBase::RegisterEverything( pluginFn );
}
EXPORT MStatus uninitializePlugin( MObject mObject )
{
	MStatus retVal;
	MStatus regStat;

	MFnPlugin pluginFn( mObject );

	return CVsMayaMPxFactoryBase::DeregisterEverything( pluginFn );
}
Exemplo n.º 5
0
EXPORT MStatus uninitializePlugin( MObject mObject )
{
	if ( !g_okToUnload )
		return MS::kFailure;

	MFnPlugin pluginFn( mObject );

	return CVsMayaMPxFactoryBase::DeregisterEverything( pluginFn );
}
Exemplo n.º 6
0
MStatus
uninitializePlugin(MObject plugin)
{
    MStatus status;
    MFnPlugin pluginFn(plugin);
    
    // Deregister elements here
    
    return status;
}
Exemplo n.º 7
0
MStatus
initializePlugin(MObject plugin)
{
    MStatus status;
    MFnPlugin pluginFn(plugin, "Gary Tse", "1.0.0", "Any");
    
    // Register elements here
    
    return status;
}
Exemplo n.º 8
0
MStatus
uninitializePlugin(MObject plugin)
{
    //MStatus status;
    MFnPlugin pluginFn(plugin);
    
    // Deregister elements here
    MStatus status = pluginFn.deregisterCommand("helix");
    CHECK_MSTATUS_AND_RETURN_IT(status);
    return status;
}
Exemplo n.º 9
0
MStatus uninitializePlugin ( MObject obj )
{
	MFnPlugin pluginFn(obj);
	MStatus status = MS::kSuccess;

	deletedMessage::removeCallbacks();

	status = pluginFn.deregisterCommand("deletedMessage");

	return status;
}
Exemplo n.º 10
0
MStatus
initializePlugin(MObject plugin)
{
    //MStatus status;
    MFnPlugin pluginFn(plugin, "Gary Tse", "1.0.0", "Any");     // object, author, plugin version, Maya version required
    
    // Register elements here
    MStatus status = pluginFn.registerCommand("helix", DoHelix::creator);
    CHECK_MSTATUS_AND_RETURN_IT(status);
    return status;
}
Exemplo n.º 11
0
MStatus initializePlugin(MObject obj)
{
	MFnPlugin pluginFn(obj, PLUGIN_COMPANY, "6.0");

	MStatus status;
	status = pluginFn.registerCommand("deletedMessage", deletedMessage::creator, deletedMessage::newSyntax);

	if( !status)
		status.perror("register Command failed");

	return status;
}
Exemplo n.º 12
0
EXPORT MStatus initializePlugin( MObject mObject )
{
	MStatus retVal;
	MStatus regStat;

	MFnPlugin pluginFn( mObject, "Valve", "1.0", "Any" );

	// For CVstAimNode
	MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f, false, false, false, false );

	return CVsMayaMPxFactoryBase::RegisterEverything( pluginFn );
}
Exemplo n.º 13
0
MStatus uninitializePlugin( MObject obj )
{
	MStatus status;
	MFnPlugin pluginFn( obj );

	// Remove the menu item.
	MGlobal::executeCommand("deleteUI -m ogreExportMenu;");

	// deregister command
	status = pluginFn.deregisterCommand("OgreExport");

	return status;
}
Exemplo n.º 14
0
MStatus uninitializePlugin ( MObject obj )
{
	MFnPlugin pluginFn(obj);
	MStatus status = MS::kSuccess;
	
	//remove call backs
	MUserEventMessage::deregisterUserEvent("TestFoo1");
	MUserEventMessage::deregisterUserEvent("TestFoo2");

	status = pluginFn.deregisterCommand("userMessage");
	
	return status;
}
Exemplo n.º 15
0
MStatus initializePlugin(MObject obj)
{
	// Version number may need to change in the future
	//
	MFnPlugin pluginFn(obj, PLUGIN_COMPANY, "6.0");

	MStatus status;
	status = pluginFn.registerCommand("userMessage", userMessage::creator, userMessage::newSyntax);

	if( !status)
		status.perror("register Command failed");

	return status;
}
Exemplo n.º 16
0
// entry point
MStatus initializePlugin( MObject obj )
{
	const char *vendor = "Jeremy \"DrEvil\" Swigart";
	const char *version = "Any";

	MFnPlugin pluginFn(obj, vendor, version);

	// Register the export command.
	pluginFn.registerCommand("OgreExport", OgreMayaExporter::creator, OgreMayaExporter::exporterSyntax);
	pluginFn.registerCommand("OgreGetFolder", CMayaGetFolder::creator);

	// Create the Menu item
	MGlobal::executeCommand("source \"OgreExporter.mel\"; setParent \"MayaWindow\"; menu -label \"Ogre Export\" -tearOff false ogreExportMenu; menuItem -label \"Export\" -command \"OgreExporter\";");	

	return MStatus::kSuccess;
}
Exemplo n.º 17
0
MStatus
uninitializePlugin(MObject plugin)
{
    MStatus status;
    MFnPlugin pluginFn(plugin);
    
    // Deregister elements here
    
    status = pluginFn.deregisterNode(Sine::id);
    
    if (!status) {
        status.perror("deregisterNode");
        return status;
    }
    
    return status;
}
Exemplo n.º 18
0
MStatus
initializePlugin(MObject plugin)
{
    MStatus status;
    MFnPlugin pluginFn(plugin, "Gary Tse", "1.0.0", "Any");
    
    // Register elements here
    
    status = pluginFn.registerNode("sine", Sine::id, Sine::creator, Sine::initialize);
    
    if (!status) {
        status.perror("registerNode");
        return status;
    }
    
    return status;
}
Exemplo n.º 19
0
EXPORT MStatus initializePlugin( MObject mObject )
{
	MFnPlugin pluginFn( mObject, "Valve", "1.0", "Any" );

	MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f, false, false, false, false );

	MStatus retVal( CVsMayaMPxFactoryBase::RegisterEverything( pluginFn ) );

	if ( retVal )
	{
		MGlobal::executeCommand( "source vsSkinner.mel" );

		if ( MFnPlugin::findPlugin( "decomposeMatrix" ) == MObject::kNullObj )
		{
			MGlobal::executeCommand( "catchQuiet( loadPlugin( \"-qt\", \"decomposeMatrix\" ) );" );
		}
	}

	return retVal;
}
Exemplo n.º 20
0
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 pluginFn( obj );

	// Add plug-in feature deregistration here
	//
	status = pluginFn.deregisterNode( particleAttrNode::id );

	MGlobal::displayInfo("particleAttrNode unloaded.");

	return status;
}
Exemplo n.º 21
0
// ==========================================================================
//
//          Plugin load/unload
//
// ==========================================================================
MStatus initializePlugin(MObject plugin)
{
    MStatus     st;
    MFnPlugin   pluginFn(plugin, "Autodesk, Inc.", "1.0", "Any", &st);
    if (!st) {
        MGlobal::displayError(
            MString("helixQtCmd - could not initialize plugin: ")
            + st.errorString()
            );
        return st;
    }
    //  Register the command.
    st = pluginFn.registerCommand(HelixQtCmd::commandName, HelixQtCmd::creator);
    if (!st) {
        MGlobal::displayError(
            MString("helixQtCmd - could not register '")
            + HelixQtCmd::commandName + "' command: "
            + st.errorString()
            );
        return st;
    }
    return st;
}