mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Bug fixes:
Generating image previews of image assets was failing DDS remove redundant check for stream status. STB requires the file to be free before being written to, move check to make sure we can open the path into gBitmap and remove FileStream checks from everywhere else.
This commit is contained in:
parent
0b451aa7b5
commit
63682c43ec
11 changed files with 39 additions and 111 deletions
|
|
@ -67,13 +67,6 @@ bool TerrainBlock::exportHeightMap( const UTF8 *filePath, const String &format )
|
|||
}
|
||||
}
|
||||
|
||||
FileStream stream;
|
||||
if ( !stream.open( filePath, Torque::FS::File::Write ) )
|
||||
{
|
||||
Con::errorf( "TerrainBlock::exportHeightMap() - Error opening file for writing: %s !", filePath );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !output.writeBitmap( format, filePath) )
|
||||
{
|
||||
Con::errorf( "TerrainBlock::exportHeightMap() - Error writing %s: %s !", format.c_str(), filePath );
|
||||
|
|
@ -120,13 +113,6 @@ bool TerrainBlock::exportLayerMaps( const UTF8 *filePrefix, const String &format
|
|||
UTF8 filePath[1024];
|
||||
dSprintf( filePath, 1024, "%s_%d_%s.%s", filePrefix, i, mFile->mMaterials[i]->getInternalName(), format.c_str() );
|
||||
|
||||
FileStream stream;
|
||||
if ( !stream.open( filePath, Torque::FS::File::Write ) )
|
||||
{
|
||||
Con::errorf( "TerrainBlock::exportLayerMaps() - Error opening file for writing: %s !", filePath );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !output.writeBitmap( format, filePath) )
|
||||
{
|
||||
Con::errorf( "TerrainBlock::exportLayerMaps() - Error writing %s: %s !", format.c_str(), filePath );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue