コード例 #1
0
ファイル: AbcBullet.cpp プロジェクト: BigRoy/Maya-devkit
MStatus uninitializePlugin(MObject obj)
{
	MStatus status;
	MFnPlugin plugin(obj);

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

	//MGlobal::executeCommandOnIdle("AlembicDeleteUI");

	return status;
}
コード例 #2
0
MStatus initializePlugin(MObject obj)
{
	MStatus status;
	MFnPlugin plugin(obj, PLUGIN_COMPANY, "3.0", "Any");

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

	return status;
}
コード例 #3
0
ファイル: moveTool.cpp プロジェクト: BigRoy/Maya-devkit
///////////////////////////////////////////////////////////////////////
//
// The following routines are used to register/unregister
// the commands we are creating within Maya
//
///////////////////////////////////////////////////////////////////////
MStatus initializePlugin( MObject obj )
{
	MStatus		status;
	MFnPlugin	plugin( obj, PLUGIN_COMPANY, "3.0", "Any" );

	status = plugin.registerContextCommand( CREATE_CTX_NAME,
									&moveContextCommand::creator,
									MOVENAME, &moveCmd::creator );
	if (!status) {
		status.perror("registerContextCommand");
		return status;
	}

	return status;
}
コード例 #4
0
ファイル: nodeInfoCmd.cpp プロジェクト: OpenXRay/xray
/////////////////////////////////////////////////////////////////
//
// The following routines are used to register/unregister
// the command we are creating within Maya
//
/////////////////////////////////////////////////////////////////
MStatus initializePlugin( MObject obj )
{
	MStatus   status;
	MFnPlugin plugin( obj, PLUGIN_COMPANY, "3.0", "Any");

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

	return status;
}
コード例 #5
0
ファイル: pluginMain.cpp プロジェクト: illmillrig/BlurBetween
MStatus uninitializePlugin(MObject obj){
	MStatus stat;
	MFnPlugin plugin(obj);


	// get rid of any QT ui's
    BlurTweenUICmd::cleanup();


	stat = plugin.deregisterCommand("blurTween");
	if (!stat){
		stat.perror("deregisterCommand");
		return stat;
	}


	stat = plugin.deregisterCommand("blurTweenUI");
	if (!stat){
		stat.perror("deregisterCommand");
		return stat;
	}

	return stat;
}
コード例 #6
0
ファイル: pluginMain.cpp プロジェクト: spohle/mayaDev
MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	MFnPlugin plugin( obj, "Sven Pohle", "2016", "Any");

	status = plugin.registerNode( "curveLocator", curveLocator::id, curveLocator::creator,
								  curveLocator::initialize, MPxNode::kLocatorNode,
								  &curveLocator::drawDbClassification);
	if (!status) {
		status.perror("registerNode");
		return status;
	}

	status = MHWRender::MDrawRegistry::registerDrawOverrideCreator(
		curveLocator::drawDbClassification,
		curveLocator::drawRegistrantId,
		CurveLocatorDrawOverride::Creator);
	if (!status) {
		status.perror("registerDrawOverrideCreator");
		return status;
	}

	return status;
}
コード例 #7
0
//! Initialize plugin for LaplacianSmoother.
MStatus initializePlugin ( MObject obj )
{
    MStatus status;
    MFnPlugin plugin ( obj, "Tody", "1.0", "Any" );
    status = plugin.registerNode ( LaplacianSmoother::getMayaName(), LaplacianSmoother::id, LaplacianSmoother::creator,
                                   LaplacianSmoother::initialize,  MPxNode::kDeformerNode );

    if ( !status )
    {
        status.perror ( "initialized plug-in" );
        status.perror ( status.errorString( ) );
    }

    return status;
}
コード例 #8
0
MStatus initializePlugin ( MObject obj )
{
	MStatus   status;
	MFnPlugin plugin(obj, "Autodesk - nCloth Prototype 4", "8.5", "Any");	

	status = plugin.registerNode ( "testNucleusNode", testNucleusNode::id,testNucleusNode ::creator, testNucleusNode::initialize );

	if ( !status )
	{
		status.perror("registerNode");
		return status;
	}

	return status;
}
コード例 #9
0
ファイル: exportF3d.cpp プロジェクト: UIKit0/Field3D
MStatus uninitializePlugin( MObject obj)
{
    MStatus status;
    MFnPlugin plugin( obj );

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

    return status;
    
}
コード例 #10
0
ファイル: GtoIO.cpp プロジェクト: AtomicFiction/open-gto
// *****************************************************************************
MStatus initializePlugin( MObject _obj )
{
    MFnPlugin   plugin( _obj, "Tweak Films", GtoIOPlugin::versionString() );
    MStatus     stat;
    stat = plugin.registerFileTranslator( "GTO",
                                          "none",
                                          GtoIOPlugin::GtoIO::creator,
                                          "gtoIOOptions", "",
                                          false );
    if( ! stat )
    {
        stat.perror( "initializePlugin" );
    }
    return stat;
}
コード例 #11
0
extern MStatus initializePlugin(MObject obj)
{
	MStatus status;
	MFnPlugin plugin(obj, PLUGIN_COMPANY, "3.0", "Any");
	
	status = plugin.registerCommand("clusterWeightFunction",
									clusterWeightFunctionCmd::creator,
									clusterWeightFunctionCmd::newSyntax);
	
	if (!status) {
		status.perror("registerCommand");
	}

	return status;
}
コード例 #12
0
ファイル: Plugin.cpp プロジェクト: NCCA/MayaAPICode
MStatus uninitializePlugin( MObject obj )
{
	MStatus   status;
	MFnPlugin plugin( obj );


	status = plugin.deregisterNode( JoyPadNode::m_id );
	if (!status)
	{
		status.perror( "unable to deregister JoyPadNode" );
		return status;
	}

	return status;
}
コード例 #13
0
ファイル: rtgTranslator.cpp プロジェクト: DimondTheCat/xray
MStatus 
uninitializePlugin (MObject obj)
{
	MStatus         status;
	MFnPlugin       plugin (obj);

	status = plugin.deregisterFileTranslator ("rtg");
	if (!status)
	{
		status.perror ("deregisterFileTranslator");
		//return status;
	}

	return status;
}
コード例 #14
0
MStatus initializePlugin(MObject obj)
{
	MStatus   status;
	MFnPlugin plugin(obj, PLUGIN_COMPANY, "7.0", "Any");

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

	return status;
}
コード例 #15
0
ファイル: PluginMain.cpp プロジェクト: adairrabbit/LiuSalon
MStatus initializePlugin( MObject obj )
{
    MStatus   status = MStatus::kSuccess;
    MFnPlugin plugin( obj, "LiuSalon", "1.0", "Any");

	// load external ui
    MGlobal::executeCommand("source \"" + plugin.loadPath() + "/ui.mel\"");
	status = plugin.registerUI("createLiuSalonUI", "deleteLiuSalonUI");

	filePath = plugin.loadPath();

	// Register Command
	status = plugin.registerCommand( "LiuSalonCmd", LiuSalonCmd::creator, LiuSalonCmd::newSyntax );
    if (!status) {
        status.perror("registerCommand");
        return status;
    }

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

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

	return status;
}
コード例 #16
0
MStatus initializePlugin( MObject obj )
{
	MStatus   status;
    MFnPlugin plugin( obj, PLUGIN_COMPANY, "4.0", "Any");

    // NOTE: referenceQuery is already a Maya cmd
    status = plugin.registerCommand( "refQuery", 
									 referenceQuery::creator );
	if (!status) {
		status.perror("registerCommand");
		return status;
	}

    return status;
}
コード例 #17
0
MStatus uninitializePlugin( MObject obj)
{
	TRACE_OUTPUT("uninitializePlugin(...)")

	MStatus   status;
	MFnPlugin plugin( obj );

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

	return status;
}
コード例 #18
0
ファイル: footPrintNode.cpp プロジェクト: BigRoy/Maya-devkit
MStatus footPrint::initialize()
{
	MFnUnitAttribute unitFn;
	MStatus			 stat;

	size = unitFn.create( "size", "sz", MFnUnitAttribute::kDistance );
	unitFn.setDefault( 1.0 );

	stat = addAttribute( size );
	if (!stat) {
		stat.perror("addAttribute");
		return stat;
	}

	return MS::kSuccess;
}
コード例 #19
0
ファイル: Plugin.cpp プロジェクト: Qaanaaq/MayaAPICode
MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	MFnPlugin plugin( obj, "", "NCCA" , "Any" );

  // register our nodes and the commands which will be called
	status = plugin.registerNode( "cubeLocator", CubeLocatorNode::m_id, &CubeLocatorNode::creator, &CubeLocatorNode::initialize, MPxNode::kLocatorNode );
	if (!status)
	{
		status.perror("Unable to register CubeLocatorNode" );
		return status;
	}


	return status;
}
コード例 #20
0
MStatus initializePlugin( MObject obj )
{
	TRACE_OUTPUT("initializePlugin(...)")

	MStatus   status;
	MFnPlugin plugin( obj, "Tim Milstead", "1.0", "Any");

	status = plugin.registerNode( "audioAnalyzer", audioAnalyzer::id, audioAnalyzer::creator,  audioAnalyzer::initialize );
	if (!status)
	{
		status.perror("Error registering audioData node");
		return status;
	}

	return status;
}
コード例 #21
0
ファイル: Plugin.cpp プロジェクト: NCCA/MayaAPICode
MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	MFnPlugin plugin( obj, "", "NCCA" , "Any" );

  // register our nodes and the commands which will be called
  status = plugin.registerNode( "JoyPadNode", JoyPadNode::m_id, &JoyPadNode::creator, &JoyPadNode::initialize, MPxNode::kThreadedDeviceNode );
	if (!status)
	{
		status.perror("Unable to register JoyPadNode" );
		return status;
	}


	return status;
}
コード例 #22
0
		MStatus CreateCurves::undo() {
			MStatus status;
			
			for(unsigned int i = 0; i < m_curves.length(); ++i) {
				std::cerr << "DeleteNode: " << MFnDagNode(m_curves[i]).fullPathName().asChar() << std::endl;

				if (!(status = MGlobal::removeFromModel(m_curves[i]))) {
					status.perror("MGlobal::removeFromModel");
					return status;
				}
			}

			m_curves.clear();

			return MStatus::kSuccess;
		}
コード例 #23
0
ファイル: drnMayaPlugin.cpp プロジェクト: AdrienHerubel/drone
MStatus initializePlugin( MObject obj )
{
	MStatus			status;
	MFnPlugin plugin( obj, "Drone", "1.0", "Any");
	status = plugin.registerFileTranslator( "drnTranslator", "none",
											DRNTranslator::creator,
											"drnTranslator",
											NULL,
											false);
	if (!status)
	{
		status.perror("Impossible to register drone exporter");
		return status;
	}
	return status;
}
コード例 #24
0
ファイル: squash.cpp プロジェクト: jonntd/mayadev-1
MStatus squash::initialize()
{
	MFnNumericAttribute nAttr;
	MStatus				stat;

	lengthOriginal = nAttr.create( "lengthOriginal", "lo", MFnNumericData::kDouble, 1.0 );
	nAttr.setStorable(true);
	lengthModify = nAttr.create( "lengthModify", "lm", MFnNumericData::kDouble, 1.0 );
	nAttr.setStorable(true);
	squashRate = nAttr.create( "squashRate", "r", MFnNumericData::kDouble, 1.0 );
	nAttr.setStorable(true);
	forceValue = nAttr.create( "forceValue", "f", MFnNumericData::kDouble, 0.0 );
	nAttr.setStorable(true);

	output = nAttr.create( "output", "o", MFnNumericData::kDouble, 0.0 );
	nAttr.setWritable(false);
	nAttr.setStorable(true);

	stat = addAttribute( lengthOriginal );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( lengthModify );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( squashRate );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( forceValue );
		if (!stat) { stat.perror("addAttribute"); return stat;}
	stat = addAttribute( output );
		if (!stat) { stat.perror("addAttribute"); return stat;}

	stat = attributeAffects( lengthOriginal, output );
		if (!stat) { stat.perror("attributeAffects"); return stat;}
	stat = attributeAffects( lengthModify, output );
		if (!stat) { stat.perror("attributeAffects"); return stat;}
	stat = attributeAffects( squashRate, output );
		if (!stat) { stat.perror("attributeAffects"); return stat;}
	stat = attributeAffects( forceValue, output );
		if (!stat) { stat.perror("attributeAffects"); return stat;}

	return MS::kSuccess;
}
コード例 #25
0
ファイル: pluginMain.cpp プロジェクト: bungnoid/MG_Tools
MStatus initializePlugin( MObject obj )
{ 
	MStatus stat;

	MFnPlugin fnPlugin( obj, "Marco Giordano", "1.0", "Any");


	stat  =fnPlugin.registerNode("MG_dotProduct",
		MTypeId(0x832496),MG_dotProduct::creator,
		MG_dotProduct::initialize);

	if( stat != MS::kSuccess )
		stat.perror( "could not register the CustomLocator node" );

	return stat; 
}
コード例 #26
0
MStatus initializePlugin( MObject obj )						
{																
	MFnPlugin	plugin( obj, PLUGIN_COMPANY, "6.0" );				
	MStatus		stat;											
	stat = plugin.registerCommand( "nodeCreatedCB",					
	                                nodeCreatedCB::creator,
									nodeCreatedCB::newSyntax );	    
	if ( !stat )												
		stat.perror("registerCommand");	
	
	// add the API callback.
	//
	nodeCreatedCB::sId = MDGMessage::addNodeAddedCallback( nodeCreatedCB::sCallbackFunc );

	return stat;												
}																
コード例 #27
0
ファイル: polyRawExporter.cpp プロジェクト: DimondTheCat/xray
MStatus uninitializePlugin(MObject obj) 
//Summary:	deregisters the commands, tools, devices, and so on, defined by the 
//			plug-in
//Returns:	MStatus::kSuccess if the deregistration was successful;
//			MStatus::kFailure otherwise
{
	MStatus   status;
	MFnPlugin plugin( obj );

	status =  plugin.deregisterFileTranslator("RawText");
	if (!status) {
		status.perror("deregisterFileTranslator");
		return status;
	}

	return status;
}
コード例 #28
0
ファイル: ExportCmd.cpp プロジェクト: ryutaro765/Alembic
//-*****************************************************************************
MStatus uninitializePlugin( MObject obj )
{
    
    MStatus status;
    MFnPlugin plugin( obj );

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

    
    // H5close();

    return status;
}
コード例 #29
0
MStatus uninitializePlugin( MObject obj )						
{																
	MFnPlugin	plugin( obj );									
	MStatus		stat;											
	stat = plugin.deregisterCommand( "nodeCreatedCB" );				
	if ( !stat )												
		stat.perror("deregisterCommand");						

	// Remove the API callback, necessary to prevent crashes.
	//
	MDGMessage::removeCallback( nodeCreatedCB::sId );

	nodeCreatedCB::sMelProcs.clear();
	nodeCreatedCB::sFullDagPath.clear();
	
	return stat;												
}
コード例 #30
0
MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	
	const MString UserClassify( "shader/surface/utility" );

	MFnPlugin plugin( obj, PLUGIN_COMPANY, "4.0", "Any");
	status = plugin.registerNode( "hwRefractReflectShader_NV20", hwRefractReflectShader_NV20::id, 
			                      hwRefractReflectShader_NV20::creator, hwRefractReflectShader_NV20::initialize,
								  MPxNode::kHwShaderNode, &UserClassify );
	if (!status) {
		status.perror("registerNode");
		return status;
	}

	return MS::kSuccess;
}