mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +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
|
|
@ -505,13 +505,10 @@ void TSLastDetail::_update()
|
|||
String normalsPath = _getNormalMapPath();
|
||||
|
||||
FileStream stream;
|
||||
if ( stream.open( imposterPath, Torque::FS::File::Write ) )
|
||||
destBmp.writeBitmap( "png", imposterPath);
|
||||
stream.close();
|
||||
|
||||
if ( stream.open( normalsPath, Torque::FS::File::Write ) )
|
||||
destNormal.writeBitmap( "png", normalsPath);
|
||||
stream.close();
|
||||
if (!destBmp.writeBitmap("png", imposterPath))
|
||||
Con::errorf("TSLastDetail::_update() - failed to write imposter %s", imposterPath);
|
||||
if (!destNormal.writeBitmap("png", normalsPath))
|
||||
Con::errorf("TSLastDetail::_update() - failed to write normal %s", normalsPath);
|
||||
}
|
||||
|
||||
// DEBUG: Some code to force usage of a test image.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue