Added refactor of Editor Settings window

Various fixes for asset handling.
WIP of crash tracking
This commit is contained in:
Areloch 2019-06-03 02:47:30 -05:00
parent 691d3f501e
commit ff871f37e3
30 changed files with 662 additions and 273 deletions

View file

@ -1076,11 +1076,6 @@ void PostEffect::_setupConstants( const SceneRenderState *state )
setShaderConsts_callback();
}
if (mShaderName == String("PFX_ReflectionProbeArray") || getName() == StringTable->insert("reflectionProbeArrayPostFX"))
{
bool derp = true;
}
EffectConstTable::Iterator iter = mEffectConsts.begin();
for ( ; iter != mEffectConsts.end(); iter++ )
iter->value->setToBuffer( mShaderConsts );
@ -1607,6 +1602,22 @@ void PostEffect::setTexture( U32 index, const String &texFilePath )
mTextureType[index] = NormalTextureType;
}
void PostEffect::setTexture(U32 index, const GFXTexHandle& texHandle)
{
// Set the new texture name.
mTexFilename[index] = "";
mTextures[index].free();
// Skip empty stages or ones with variable or target names.
if (!texHandle.isValid())
return;
// Try to load the texture.
mTextures[index] = texHandle;
mTextureType[index] = NormalTextureType;
}
void PostEffect::setCubemapTexture(U32 index, const GFXCubemapHandle &cubemapHandle)
{
// Set the new texture name.
@ -2048,4 +2059,4 @@ DefineEngineFunction( dumpRandomNormalMap, void, (),,
String path = Torque::FS::MakeUniquePath( "", "randNormTex", "png" );
tex->dumpToDisk( "png", path );
}
}