当前位置: 首页>>代码示例>>C++>>正文


C++ MCallbackIdArray::length方法代码示例

本文整理汇总了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 );
}
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:11,代码来源:dagMessageCmd.cpp

示例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; 
}
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:14,代码来源:lockEvent.cpp

示例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;
}
开发者ID:ADN-DevTech,项目名称:Maya-Training-Material,代码行数:24,代码来源:pluginMain.cpp


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