本文整理汇总了C++中plugin函数的典型用法代码示例。如果您正苦于以下问题:C++ plugin函数的具体用法?C++ plugin怎么用?C++ plugin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 );
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}