Updates the rest of the asset types to utilize separate expanded path variables to avoid breaking assetDef saving

Fixes select mode for the Asset Browser to properly filter to the selecting type
Fixes the imageType in the asset import window inspector to properly set to the importing image asset's discovered type if valid
Fixes AssetBrowser asset selection return so it returns back a valid assetId
Fixes TerrainMaterial save crash by ensuring we fill in the diffuseMapAsset
Removes saving of TerrainMaterial being saved to a generic script file if one isn't found for an existing TerrainMaterialAssets
This commit is contained in:
Areloch 2020-08-09 01:32:27 -05:00
parent 08f8d8abf2
commit 79ecc2f4a0
30 changed files with 241 additions and 106 deletions

View file

@ -92,6 +92,13 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false)
mForestFile = StringTable->EmptyString();
mNavmeshFile = StringTable->EmptyString();
mLevelPath = StringTable->EmptyString();
mPreviewImagePath = StringTable->EmptyString();
mPostFXPresetPath = StringTable->EmptyString();
mDecalsPath = StringTable->EmptyString();
mForestPath = StringTable->EmptyString();
mNavmeshPath = StringTable->EmptyString();
mGamemodeName = StringTable->EmptyString();
mMainLevelAsset = StringTable->EmptyString();
@ -151,12 +158,23 @@ void LevelAsset::initializeAsset()
Parent::initializeAsset();
// Ensure the image-file is expanded.
mPreviewImage = expandAssetFilePath(mPreviewImage);
mLevelFile = expandAssetFilePath(mLevelFile);
mPostFXPresetFile = expandAssetFilePath(mPostFXPresetFile);
mDecalsFile = expandAssetFilePath(mDecalsFile);
mForestFile = expandAssetFilePath(mForestFile);
mNavmeshFile = expandAssetFilePath(mNavmeshFile);
mPreviewImagePath = expandAssetFilePath(mPreviewImage);
mLevelPath = expandAssetFilePath(mLevelFile);
mPostFXPresetPath = expandAssetFilePath(mPostFXPresetFile);
mDecalsPath = expandAssetFilePath(mDecalsFile);
mForestPath = expandAssetFilePath(mForestFile);
mNavmeshPath = expandAssetFilePath(mNavmeshFile);
}
void LevelAsset::onAssetRefresh(void)
{
// Ensure the image-file is expanded.
mPreviewImagePath = expandAssetFilePath(mPreviewImage);
mLevelPath = expandAssetFilePath(mLevelFile);
mPostFXPresetPath = expandAssetFilePath(mPostFXPresetFile);
mDecalsPath = expandAssetFilePath(mDecalsFile);
mForestPath = expandAssetFilePath(mForestFile);
mNavmeshPath = expandAssetFilePath(mNavmeshFile);
}
//