• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ plugin函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中plugin函数的典型用法代码示例。如果您正苦于以下问题:C++ plugin函数的具体用法?C++ plugin怎么用?C++ plugin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了plugin函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: __declspec

__declspec(dllexport) MStatus initializePlugin( MObject io_object )
{
	// Create a plugin function set
	MFnPlugin plugin( io_object );

	// Register the exporter
	MStatus status;
	{
		char* noIcon = "none";
		status = plugin.registerFileTranslator( s_pluginName, noIcon,
			// This function is what Maya should call to create a new instance of the mesh exporter
			eae6320::cMayaMeshExporter::Create );
		if ( !status )
		{
			MGlobal::displayError( MString( "Failed to register mesh exporter: " ) + status.errorString() );
		}
	}
    return status;
}
开发者ID:karthiknarayan0512,项目名称:GraphicsEngine,代码行数:19,代码来源:EntryPoint.cpp


示例2: uninitializePlugin

MStatus uninitializePlugin(MObject obj)
{
	MStatus status;
	MFnPlugin plugin(obj);

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

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

	return status;
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:19,代码来源:swissArmyManip.cpp


示例3: initializePlugin

//-*****************************************************************************
MLL_EXPORT MStatus initializePlugin( MObject obj )
{
    MStatus status;
    MFnPlugin plugin( obj, "Alembic", "1.0", "Any" );

    // H5dont_atexit();
    // H5open();

    status = plugin.registerCommand( "AlembicSimpleAbcExport",
                                     AlembicSimpleAbcExport::AbcExport::creator,
                                     AlembicSimpleAbcExport::AbcExport::createSyntax );

    if ( !status )
    {
        status.perror( "registerCommand" );
    }

    return status;
}
开发者ID:oyaGG,项目名称:helgemathee-alembic-softimage,代码行数:20,代码来源:ExportCmd.cpp


示例4: initializePlugin

MStatus initializePlugin( MObject obj )
{ 
	MStatus   status = MStatus::kFailure;

	MFnPlugin plugin( obj, PLUGIN_COMPANY, "1.0", "Any");

	// Register the renderer
	//
	g_OpenGLRenderer = new OpenGLViewportRenderer();
	if (g_OpenGLRenderer)
	{
		status = g_OpenGLRenderer->registerRenderer();
		if (status != MStatus::kSuccess)
		{
			status.perror("Failed to register OpenGL renderer properly.");
		}
	}
	return status;
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:19,代码来源:OpenGLViewportRendererPlugin.cpp


示例5: initializePlugin

MStatus initializePlugin(MObject obj){ 
	MStatus stat;
	MFnPlugin plugin(obj);

	stat = plugin.registerCommand("blurTween", BlurBetween::creator, BlurBetween::syntaxCreator);
	if (!stat){
		stat.perror("registerCommand");
		return stat;
	}


	stat = plugin.registerCommand("blurTweenUI", BlurTweenUICmd::creator);
	if (!stat){
		stat.perror("registerCommand");
		return stat;
	}

	return stat;
}
开发者ID:illmillrig,项目名称:BlurBetween,代码行数:19,代码来源:pluginMain.cpp


示例6: it

void OutputMap::loadPlugins(const QDir& dir)
{
    /* Check that we can access the directory */
    if (dir.exists() == false || dir.isReadable() == false)
        return;

    /* Loop thru all files in the directory */
    QStringListIterator it(dir.entryList());
    while (it.hasNext() == true)
    {
        /* Attempt to load a plugin from the path */
        QString fileName(it.next());
        QString path = dir.absoluteFilePath(fileName);
        QPluginLoader loader(path, this);
        QLCOutPlugin* p = qobject_cast<QLCOutPlugin*> (loader.instance());
        if (p != NULL)
        {
            /* Check for duplicates */
            if (plugin(p->name()) == NULL)
            {
                /* New plugin. Append and init. */
                qDebug() << "Output plugin" << p->name() << "from" << fileName;
                p->init();
                appendPlugin(p);
                QLCi18n::loadTranslation(p->name().replace(" ", "_"));
            }
            else
            {
                /* Duplicate plugin. Unload it. */
                qWarning() << Q_FUNC_INFO << "Discarded duplicate output plugin"
                           << path;
                loader.unload();
            }
        }
        else
        {
            qWarning() << Q_FUNC_INFO << fileName
                       << "doesn't contain a QLC output plugin:"
                       << loader.errorString();
            loader.unload();
        }
    }
}
开发者ID:glocklueng,项目名称:qlc,代码行数:43,代码来源:outputmap.cpp


示例7: uninitializePlugin

MStatus uninitializePlugin( MObject obj)
{
	MStatus   status;
	MFnPlugin plugin( obj );

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

	status = plugin.deregisterConstraintCommand( "geometrySurfaceConstraint" );
	if (!status) {
		status.perror("deregisterNode");
		return status;
	}

	return status;
}
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:19,代码来源:geometrySurfaceConstraint.cpp


示例8: plugin

//! Transform the polygon to the tile referential
QcPolygon
QcMapViewLayer::transform_polygon(const QcPolygon & polygon) // Fixme: const
{
  const QcTileMatrixSet & tile_matrix_set = plugin()->tile_matrix_set();
  QcPolygon transformed_polygon;
  QList<QcVectorDouble> vertexes;
  for (const auto & vertex : polygon.vertexes()) {
    // Fixme: [before in viewport] -1 else take tile on border
    auto transformed_vertex = (vertex - tile_matrix_set.origin()) * tile_matrix_set.scale();
    vertexes << transformed_vertex;
    // transformed_polygon.add_vertex(transformed_vertex);
  }
  // Fixme: inverted y
  transformed_polygon.add_vertex(vertexes[1]);
  transformed_polygon.add_vertex(vertexes[0]);
  transformed_polygon.add_vertex(vertexes[3]);
  transformed_polygon.add_vertex(vertexes[2]);
  return transformed_polygon;
}
开发者ID:FabriceSalvaire,项目名称:qtcarto,代码行数:20,代码来源:map_view.cpp


示例9: plugin

// SysMonPluginPropPage
LRESULT SysMonPluginPropPage::OnInitDialog(
    UINT msg, WPARAM w, LPARAM l, BOOL &bHandled) {
  int refresh_interval = 1;
  int active_monitors = ACTIVE_MON_CPU |
                        ACTIVE_MON_MEM |
                        ACTIVE_MON_DISK |
                        ACTIVE_MON_NET;
  int max_disk_rw = kDefaultMaxDiskRWInChart;
  int max_net_io = kDefaultMaxNetIOInChart;
  int auto_adjust_chart_max = kDefaultAutoAdjustChartMax;

  CComQIPtr<IGoogleDesktopSysMonPlugin> plugin(m_ppUnk[0]);
  if (plugin) {
    ATLVERIFY(SUCCEEDED(plugin->get_refresh_interval(&refresh_interval)));
    ATLVERIFY(SUCCEEDED(plugin->get_active_monitors(&active_monitors)));
    ATLVERIFY(SUCCEEDED(plugin->get_max_disk_rw_in_chart(&max_disk_rw)));
    ATLVERIFY(SUCCEEDED(plugin->get_max_net_io_in_chart(&max_net_io)));
    ATLVERIFY(SUCCEEDED(plugin->get_auto_adjust_chart_max(&auto_adjust_chart_max)));
  }

  SetDlgItemInt(IDC_EDIT_REFRESH_INTERVAL, refresh_interval, FALSE);
  SetDlgItemInt(IDC_EDIT_MAX_DISK_RW, max_disk_rw, FALSE);
  SetDlgItemInt(IDC_EDIT_MAX_NET_IO, max_net_io, FALSE);

  if (active_monitors & ACTIVE_MON_CPU)
    ::SendMessage(GetDlgItem(IDC_CHECK_CPU), BM_SETCHECK, BST_CHECKED, 0);
  if (active_monitors & ACTIVE_MON_MEM)
    ::SendMessage(GetDlgItem(IDC_CHECK_MEM), BM_SETCHECK, BST_CHECKED, 0);
  if (active_monitors & ACTIVE_MON_DISK)
    ::SendMessage(GetDlgItem(IDC_CHECK_DISK), BM_SETCHECK, BST_CHECKED, 0);
  if (active_monitors & ACTIVE_MON_NET)
    ::SendMessage(GetDlgItem(IDC_CHECK_NET), BM_SETCHECK, BST_CHECKED, 0);

  if (auto_adjust_chart_max) {
    ::SendMessage(GetDlgItem(IDC_CHECK_AUTO_MAX), BM_SETCHECK, BST_CHECKED, 0);
  }

  ::EnableWindow(GetDlgItem(IDC_EDIT_MAX_DISK_RW), !auto_adjust_chart_max);
  ::EnableWindow(GetDlgItem(IDC_EDIT_MAX_NET_IO), !auto_adjust_chart_max);

  SetDirty(FALSE);
  return 0;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:44,代码来源:sysmon_proppage.cpp


示例10: uninitializePlugin

MStatus uninitializePlugin(MObject obj)
{
	MStatus status;
	MFnPlugin plugin(obj);

	status = plugin.deregisterContextCommand("componentScaleContext");
	if (!status) {
		MGlobal::displayError("Error deregistering componentScaleContext command");
		return status;
	}

	status = plugin.deregisterNode(componentScaleManip::id);
	if (!status) {
		MGlobal::displayError("Error deregistering componentScaleManip node");
		return status;
	}

	return status;
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:19,代码来源:componentScaleManip.cpp


示例11: initializePlugin

MStatus initializePlugin( MObject obj )
{ 
	const MString	UserClassify( "shader/surface" );

	MString command( "if( `window -exists createRenderNodeWindow` ) {refreshCreateRenderNodeWindow(\"" );

	MFnPlugin plugin( obj, PLUGIN_COMPANY, "4.5", "Any" );

	CHECK_MSTATUS( plugin.registerNode( "lambertShader", lambert::id, 
			lambert::creator, lambert::initialize, MPxNode::kDependNode,
			&UserClassify ) );

   command += UserClassify;
   
   command += "\");}\n";

   CHECK_MSTATUS( MGlobal::executeCommand( command ) );

   return( MS::kSuccess );
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:20,代码来源:lambertShader.cpp


示例12: uninitializePlugin

MStatus uninitializePlugin( MObject obj) {
  MStatus status;
  MFnPlugin plugin(obj);

#if MAYA_API_VERSION >= 201600
  status = MGPUDeformerRegistry::deregisterGPUDeformerCreator(CVWrap::kName, "cvWrapOverride");
  CHECK_MSTATUS_AND_RETURN_IT(status);
#endif
  status = plugin.deregisterCommand(CVWrapCmd::kName);
  CHECK_MSTATUS_AND_RETURN_IT(status);
  status = plugin.deregisterNode(CVWrap::id);
  CHECK_MSTATUS_AND_RETURN_IT(status);

  if (MGlobal::mayaState() == MGlobal::kInteractive) {
    MGlobal::executePythonCommandOnIdle("import cvwrap.menu");
		MGlobal::executePythonCommandOnIdle("cvwrap.menu.destroy_menuitems()");
  }
  
  return status;
}
开发者ID:ahmidou,项目名称:cvwrap,代码行数:20,代码来源:pluginMain.cpp


示例13: initializePlugin

MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	MFnPlugin plugin( obj, "Locus", "2014", "Any");

	status = plugin.registerNode( "psdJointBase", MainNode::id,
		MainNode::creator, MainNode::initialize, MainNode::kDeformerNode );
	CHECK_MSTATUS_AND_RETURN_IT( status );

	status = plugin.registerCommand( "psdJointBase_addIndex", AddIndex::creator, AddIndex::newSyntax );
	CHECK_MSTATUS_AND_RETURN_IT( status );

	status = plugin.registerCommand( "psdJointBase_deleteIndex", DeleteIndex::creator, DeleteIndex::newSyntax );
	CHECK_MSTATUS_AND_RETURN_IT( status );

	status = plugin.registerCommand( "psdJointBase_addShape", AddShape::creator, AddShape::newSyntax );
	CHECK_MSTATUS_AND_RETURN_IT( status );

	return status;
}
开发者ID:jonntd,项目名称:mayadev-1,代码行数:20,代码来源:pluginMain.cpp


示例14: initializePlugin

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, "", "2009", "Any");

	// Add plug-in feature registration here
	//
	status = plugin.registerCommand("sceneMsgCmd",sceneMsgCmd::creator);

	return status;
}
开发者ID:ADN-DevTech,项目名称:Maya-Training-Material,代码行数:20,代码来源:pluginMain.cpp


示例15: Q_ASSERT

bool OutputMap::appendPlugin(QLCOutPlugin* outputPlugin)
{
    Q_ASSERT(outputPlugin != NULL);

    if (plugin(outputPlugin->name()) == NULL)
    {
        m_plugins.append(outputPlugin);
        connect(outputPlugin, SIGNAL(configurationChanged()),
                this, SLOT(slotConfigurationChanged()));
        HotPlugMonitor::connectListener(outputPlugin);
        emit pluginAdded(outputPlugin->name());
        return true;
    }
    else
    {
        qWarning() << Q_FUNC_INFO << "Output plugin" << outputPlugin->name()
                   << "is already loaded. Skipping";
        return false;
    }
}
开发者ID:glocklueng,项目名称:qlc,代码行数:20,代码来源:outputmap.cpp


示例16: uninitializePlugin

MStatus uninitializePlugin( MObject obj)
//
//	Description:
//		Deregister node
//
//	Arguments:
//		obj - a handle to the plug-in object (use MFnPlugin to access it)
//
{
	MStatus   status;
	MFnPlugin plugin( obj );

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

	return status;
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:20,代码来源:pnTrianglesNode.cpp


示例17: initializePlugin

MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	MFnPlugin plugin( obj, "Zhang Jian", "0.1.1", "Any");

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

	status = plugin.registerConstraintCommand( "geometrySurfaceConstraint", geometrySurfaceConstraintCommand::creator );
	if (!status) {
		status.perror("registerConstraintCommand");
		return status;
	}

	return status;
}
开发者ID:kkaushalp,项目名称:aphid,代码行数:20,代码来源:main.cpp


示例18: uninitializePlugin

MStatus uninitializePlugin( MObject obj)
{
	MStatus   status;
	MFnPlugin plugin( obj );

	status = MHWRender::MDrawRegistry::deregisterDrawOverrideCreator(
		footPrint::drawDbClassification,
		footPrint::drawRegistrantId);
	if (!status) {
		status.perror("deregisterDrawOverrideCreator");
		return status;
	}

	status = plugin.deregisterNode( footPrint::id );
	if (!status) {
		status.perror("deregisterNode");
		return status;
	}
	return status;
}
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:20,代码来源:footPrintNode.cpp


示例19: initializePlugin

MStatus initializePlugin( MObject obj )
{ 
	MStatus   status;
	MFnPlugin plugin( obj, "Zhang Jian", "1.7.3 Wed Jan 15 2010", "Any");
	
	status = plugin.registerData("fluidDescData", zjFluidDescData::id,
								 zjFluidDescData::creator);
	if (!status) {
		MGlobal::displayWarning("ERROR registering fluid Desc data.");
		return status;
	}

	status = plugin.registerNode( "fluidField", fluidField::id,
							fluidField::creator, fluidField::initialize,
							MPxNode::kFieldNode
							);
	if (!status) {
		status.perror("registerNode");
		return status;
	}
	
	status = plugin.registerNode( "fluidViz", fluidViz::id, 
						 &fluidViz::creator, &fluidViz::initialize,
						 MPxNode::kLocatorNode );
	if (!status) {
		status.perror("registerNode");
		return status;
	}
	
	status = plugin.registerNode( "jetEmitter", boomEmitter::id,
							&boomEmitter::creator, &boomEmitter::initialize,
							MPxNode::kEmitterNode );
	if (!status) {
		status.perror("registerNode");
		return status;
	}
	
	MGlobal::executeCommand ( "source zFluidMenus.mel; zfluidCreateMenus;" );

	return status;
}
开发者ID:saggita,项目名称:makoto,代码行数:41,代码来源:pluginMain.cpp


示例20: uninitializePlugin

// The unitializePlugin is called when Maya needs to unload the plugin.
// It basically does the opposite of initialize by calling
// the deregisterNode to remove it.
//
MStatus uninitializePlugin( MObject obj )
{
	MStatus   status;
	MFnPlugin plugin( obj );
	
	status = plugin.deregisterNode( HairNode::id );
	if (!status) {
		status.perror("deregisterNode");
		return status;
	}

	status = plugin.deregisterNode( HairDguideNode::id );
	if (!status) {
		status.perror("deregisterNode");
		return status;
	}
	
	status = plugin.deregisterCommand( "ZHairGuider" );
	if (!status) {
		status.perror("deregisterCommand");
		return status;
	}
	
	status = plugin.deregisterNode( curvePatchNode::id );
	if (!status) {
		status.perror("deregisterNode");
		return status;
	}
	
	status = plugin.deregisterContextCommand( "combCurveToolContext", "combCurveTool");

	status = plugin.deregisterNode( hairDeformer::id );
	if (!status) {
		status.perror("deregisterCommand");
		return status;
	}
		
	MGlobal::executeCommand("zhairRemoveMenus;");

	return status;
}
开发者ID:saggita,项目名称:makoto,代码行数:45,代码来源:pluginMain.cpp



注:本文中的plugin函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ plugin_dispatch_values函数代码示例发布时间:2022-05-30
下一篇:
C++ plot_pixel函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap