void Foam::objectRegistry::clear() { List<regIOobject*> myObjects(size()); label nMyObjects = 0; for (iterator iter = begin(); iter != end(); ++iter) { if (iter()->ownedByRegistry()) { myObjects[nMyObjects++] = iter(); } } for (label i=0; i < nMyObjects; i++) { checkOut(*myObjects[i]); } }
void MeshExpUtility::ExportSkinKeys(){ bool bResult = true; // Make sure there are nodes we're interested in! // Ask the scene to enumerate all its nodes so we can determine if there are any we can use INode *root_node = ip->GetRootNode(); if(!root_node){ ELog.Msg(mtError,"Scene empty." ); ELog.Msg(mtInformation,"-------------------------------------------------------" ); return; } SceneEnumProc myScene(root_node, ip->GetTime(), ip); // Any useful nodes? if(!myScene.Count()){ ELog.Msg(mtError,"Scene has no useful nodes." ); ELog.Msg(mtError,"-------------------------------------------------------" ); return; } char m_ExportName[MAX_PATH]; m_ExportName[0]=0; if( !Engine.FS.GetSaveName(Engine.FS.m_GameKeys,m_ExportName,MAX_PATH,0) ){ ELog.Msg(mtInformation,"Export cancelled" ); ELog.Msg(mtInformation,"-------------------------------------------------------" ); return; } // Construct unique names < 10 chars. myScene.BuildNames(); ObjectList myObjects(myScene); theObjects = &myObjects; bResult = SaveSkinKeys(m_ExportName); ELog.Msg(mtInformation,"-------------------------------------------------------" ); if (bResult) ELog.Msg(mtInformation,"Export completed" ); else ELog.Msg(mtError,"Export failed***********************" ); ELog.Msg(mtInformation,"-------------------------------------------------------" ); }