Work in progress: preparing new resolver scheme
This commit is contained in:
parent
2ed89c29d2
commit
4d5097b41d
|
@ -224,6 +224,9 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
tname.Replace( wxT( "/" ), wxT( "\\" ) );
|
||||
#endif
|
||||
|
||||
// this case covers full paths and paths relative to
|
||||
// the current working directory (which is not necessarily
|
||||
// the current project directory)
|
||||
if( wxFileName::FileExists( tname ) )
|
||||
{
|
||||
wxFileName tmp( tname );
|
||||
|
@ -233,8 +236,6 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
m_NameMap.insert( std::pair< wxString, wxString > ( aFileName, tname ) );
|
||||
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
return tname;
|
||||
}
|
||||
|
||||
|
@ -252,13 +253,9 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
tname = tmp.GetFullPath();
|
||||
m_NameMap.insert( std::pair< wxString, wxString > ( aFileName, tname ) );
|
||||
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
return tname;
|
||||
}
|
||||
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
// XXX - no such path - consider showing the user a pop-up message
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
@ -266,7 +263,9 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
std::list< S3D_ALIAS >::const_iterator sPL = m_Paths.begin();
|
||||
std::list< S3D_ALIAS >::const_iterator ePL = m_Paths.end();
|
||||
|
||||
// check the path relative to the current dir
|
||||
// check the path relative to the current project directory;
|
||||
// note: this is not necessarily the same as the current working
|
||||
// directory, which has already been checked
|
||||
do
|
||||
{
|
||||
wxFileName fpath( wxFileName::DirName( sPL->m_pathexp ) );
|
||||
|
@ -281,8 +280,6 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
m_NameMap.insert( std::pair< wxString, wxString > ( aFileName, tname ) );
|
||||
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
return tname;
|
||||
}
|
||||
} while( 0 );
|
||||
|
@ -294,8 +291,6 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
if( !SplitAlias( aFileName, alias, relpath ) )
|
||||
{
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
// XXX - no such path - consider showing the user a pop-up message
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
@ -316,8 +311,6 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
m_NameMap.insert( std::pair< wxString, wxString > ( aFileName, tname ) );
|
||||
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
return tname;
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +318,6 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
++sPL;
|
||||
}
|
||||
|
||||
std::cerr << "XXX: RESOLVER LINE " << __LINE__ << "\n";
|
||||
|
||||
// XXX - no such path - consider showing the user a pop-up message
|
||||
wxString errmsg = _( "filename could not be resolved" );
|
||||
std::cerr << " * [3D Model] " << errmsg.ToUTF8() << " '";
|
||||
|
|
Loading…
Reference in New Issue