本文整理汇总了C++中MCallbackIdArray::length方法的典型用法代码示例。如果您正苦于以下问题:C++ MCallbackIdArray::length方法的具体用法?C++ MCallbackIdArray::length怎么用?C++ MCallbackIdArray::length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCallbackIdArray
的用法示例。
在下文中一共展示了MCallbackIdArray::length方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: uninitializePlugin
MStatus uninitializePlugin( MObject obj)
{
// Remove callbacks
//
for (unsigned int i=0; i<callbackIds.length(); i++ ) {
MMessage::removeCallback( callbackIds[i] );
}
MFnPlugin plugin( obj );
return plugin.deregisterCommand( kCmdName );
}
示例2: clearCallbackIds
bool lockEvent::clearCallbackIds( )
//
// Description:
// Removes all currently attached callbacks.
//
{
unsigned int idCount = callbackIds.length();
for ( unsigned int i = 0; i < idCount; i ++ ) {
cerr << "callback #" << i << "; id = " << (unsigned)callbackIds[i] << endl;
MMessage::removeCallback( (MCallbackId) callbackIds[i] );
}
callbackIds.clear();
return true;
}
示例3: uninitializePlugin
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 plugin( obj );
// Add plug-in feature deregistration here
//
status = plugin.deregisterCommand("sceneMsgCmd");
//- You are responsible to remove all the callbacks you have registered in your plug-in code
MCallbackIdArray tempIds = sceneMsgCmd::IDs;
if (tempIds.length() != 0)
status = MSceneMessage::removeCallbacks(sceneMsgCmd::IDs);
return status;
}