mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Fallback to material stages for GetEditorImage()
This commit is contained in:
parent
eb2d963784
commit
6f98740772
3 changed files with 11 additions and 2 deletions
|
@ -2052,6 +2052,14 @@ void idDeclManagerLocal::ExportMaterialsToBlender_f( const idCmdArgs& args )
|
|||
{
|
||||
const idMaterial* material = static_cast< const idMaterial* >( declManagerLocal.FindType( DECL_MATERIAL, declManagerLocal.linearLists[ DECL_MATERIAL ][ i ]->GetName(), false ) );
|
||||
|
||||
#if 0
|
||||
const char* matName = material->GetName();
|
||||
if( idStr::FindText( matName, "textures/base_floor/ghotile3", false ) != -1 )
|
||||
{
|
||||
totalMaterialsCount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
material->ExportJSON( file, i == ( count - 1 ) );
|
||||
|
||||
totalMaterialsCount++;
|
||||
|
|
|
@ -576,6 +576,8 @@ void idImage::FinalizeImage( bool fromBackEnd, nvrhi::ICommandList* commandList
|
|||
opts.numLevels = 1;
|
||||
DeriveOpts();
|
||||
|
||||
defaulted = true; // RB
|
||||
|
||||
if( !commandList )
|
||||
{
|
||||
return;
|
||||
|
@ -603,7 +605,6 @@ void idImage::FinalizeImage( bool fromBackEnd, nvrhi::ICommandList* commandList
|
|||
SubImageUpload( level, 0, 0, 0, opts.width >> level, opts.height >> level, clear.Ptr() );
|
||||
}
|
||||
#endif
|
||||
defaulted = true; // RB
|
||||
isLoaded = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ idImage* idMaterial::GetEditorImage() const
|
|||
|
||||
// look for the diffusemap alternative like TrenchBroom does
|
||||
// this is required to have the texture dimensions for the convertMapToValve220 cmd
|
||||
if( editorImage && editorImage->IsLoaded() && editorImage->IsDefaulted() )
|
||||
if( editorImage && /*editorImage->IsLoaded() &&*/ editorImage->IsDefaulted() )
|
||||
{
|
||||
// _D3XP :: First check for a diffuse image, then use the first
|
||||
if( numStages && stages )
|
||||
|
|
Loading…
Reference in a new issue