mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Added refactor of Editor Settings window
Various fixes for asset handling. WIP of crash tracking
This commit is contained in:
parent
d4e55c1bf3
commit
17cec11b97
29 changed files with 660 additions and 271 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