mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
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:
parent
08f8d8abf2
commit
79ecc2f4a0
30 changed files with 241 additions and 106 deletions
|
|
@ -95,6 +95,8 @@ GameObjectAsset::GameObjectAsset()
|
|||
mGameObjectName = StringTable->EmptyString();
|
||||
mScriptFile = StringTable->EmptyString();
|
||||
mTAMLFile = StringTable->EmptyString();
|
||||
mScriptPath = StringTable->EmptyString();
|
||||
mTAMLPath = StringTable->EmptyString();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -129,25 +131,23 @@ void GameObjectAsset::copyTo(SimObject* object)
|
|||
void GameObjectAsset::initializeAsset()
|
||||
{
|
||||
//Ensure we have an expanded filepath
|
||||
if (!Platform::isFullPath(mScriptFile))
|
||||
mScriptFile = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptFile;
|
||||
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
||||
|
||||
if (Platform::isFile(mScriptFile))
|
||||
Con::executeFile(mScriptFile, false, false);
|
||||
if (Platform::isFile(mScriptPath))
|
||||
Con::executeFile(mScriptPath, false, false);
|
||||
|
||||
if (!Platform::isFullPath(mTAMLFile))
|
||||
mTAMLFile = getOwned() ? expandAssetFilePath(mTAMLFile) : mTAMLFile;
|
||||
mTAMLPath = getOwned() ? expandAssetFilePath(mTAMLFile) : mTAMLPath;
|
||||
}
|
||||
|
||||
void GameObjectAsset::onAssetRefresh()
|
||||
{
|
||||
//Ensure we have an expanded filepath
|
||||
mScriptFile = expandAssetFilePath(mScriptFile);
|
||||
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
||||
|
||||
if (Platform::isFile(mScriptFile))
|
||||
Con::executeFile(mScriptFile, false, false);
|
||||
if (Platform::isFile(mScriptPath))
|
||||
Con::executeFile(mScriptPath, false, false);
|
||||
|
||||
mTAMLFile = expandAssetFilePath(mTAMLFile);
|
||||
mTAMLPath = getOwned() ? expandAssetFilePath(mTAMLFile) : mTAMLPath;
|
||||
}
|
||||
|
||||
void GameObjectAsset::setScriptFile(const char* pScriptFile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue