mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Reworks the terrain loader code to work with the assets.
Fixes the terrain asset creation, makes the loading logic go through the asset auto-import behavior when a filename or assetid is bound that is not found. Corrects terrain material binding to properly save and load Makes the terrain asset inspector fields work as expected.
This commit is contained in:
parent
3e1795ba1d
commit
4ce558f042
15 changed files with 500 additions and 283 deletions
|
|
@ -766,15 +766,15 @@ void TerrainFile::create( String *inOutFilename,
|
|||
U32 newSize,
|
||||
const Vector<String> &materials )
|
||||
{
|
||||
// Determine the path and basename - first try using the input filename (mission name)
|
||||
// Determine the path and basename
|
||||
Torque::Path basePath( *inOutFilename );
|
||||
if ( !basePath.getExtension().equal("mis") )
|
||||
if ( !basePath.getExtension().equal("ter") )
|
||||
{
|
||||
// Use the default path and filename
|
||||
String terrainDirectory( Con::getVariable( "$pref::Directories::Terrain" ) );
|
||||
if ( terrainDirectory.isEmpty() )
|
||||
{
|
||||
terrainDirectory = "art/terrains";
|
||||
terrainDirectory = "data/terrains";
|
||||
}
|
||||
basePath.setPath( terrainDirectory );
|
||||
basePath.setFileName( "terrain" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue