char const *IFaceposerModels::GetModelFileName( int index )
{
	CFacePoserModel *entry = GetEntry( index );
	if ( !entry )
		return "";

	return entry->GetModelFileName();
}
void IFaceposerModels::SaveModelList( void )
{
	workspacefiles->StartStoringFiles( IWorkspaceFiles::MODELDATA );
	int c = Count();
	for ( int i = 0; i < c; i++ )
	{
		CFacePoserModel *m = GetEntry( i );
		if ( !m )
			continue;

		workspacefiles->StoreFile( IWorkspaceFiles::MODELDATA, m->GetModelFileName() );
	}
	workspacefiles->FinishStoringFiles( IWorkspaceFiles::MODELDATA );
}
int IFaceposerModels::FindModelByFilename( char const *filename )
{
	int c = Count();
	for ( int i = 0; i < c; i++ )
	{
		CFacePoserModel *m = GetEntry( i );
		if ( !m )
			continue;

		if ( !stricmp( m->GetModelFileName(), filename ) )
			return i;
	}

	return -1;
}