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 d4e55c1bf3
commit 17cec11b97
29 changed files with 660 additions and 271 deletions

View file

@ -117,6 +117,7 @@ Material::Material()
mDiffuse[i].set( 1.0f, 1.0f, 1.0f, 1.0f );
mDiffuseMapSRGB[i] = true;
mDiffuseMapAsset[i] = StringTable->EmptyString();
mDiffuseMapAssetId[i] = StringTable->EmptyString();
mSmoothness[i] = 0.0f;
mMetalness[i] = 0.0f;
@ -238,7 +239,7 @@ void Material::initPersistFields()
addField("diffuseMap", TypeImageFilename, Offset(mDiffuseMapFilename, Material), MAX_STAGES,
"The diffuse color texture map." );
addField("diffuseMapAsset", TypeImageAssetPtr, Offset(mDiffuseMapAsset, Material), MAX_STAGES,
addField("diffuseMapAsset", TypeImageAssetPtr, Offset(mDiffuseMapAssetId, Material), MAX_STAGES,
"The diffuse color texture map." );
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
@ -585,6 +586,15 @@ bool Material::onAdd()
if ( slash != String::NPos )
mPath = scriptFile.substr( 0, slash + 1 );
//bind any assets we have
for (U32 i = 0; i < MAX_STAGES; i++)
{
if (mDiffuseMapAssetId[i] != StringTable->EmptyString())
{
mDiffuseMapAsset[0] = mDiffuseMapAssetId[0];
}
}
_mapMaterial();
return true;