xmlNodePtr Exporter::createLibraryCameras( Context& context ) const { const Library<Camera>& lib = m_database.library<Camera>(); if( lib.size() == 0 ) { return NULL; } xmlNodePtr lc_node = newNode( NULL, "library_cameras" ); xmlAddChild( lc_node, createAsset( context, m_database.asset(), lib.asset() ) ); for( size_t i=0; i<lib.size(); i++ ) { xmlAddChild( lc_node, createCamera( context, lib.get(i) ) ); } return lc_node; }
Asset* AssetSystem::addPending(const char* pFileName) { Asset* pAsset = checkForLoadedAsset(pFileName); if (!pAsset) // it hasn't been loaded yet { pAsset = createAsset(pFileName); if (pAsset) { mLoadedAssetTable.add(pFileName, pAsset); } } return pAsset; }