mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-15 20:53:50 +00:00
Added refactor of Editor Settings window
Various fixes for asset handling. WIP of crash tracking
This commit is contained in:
parent
691d3f501e
commit
ff871f37e3
30 changed files with 662 additions and 273 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue