mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'VerveMergeWIP' of https://github.com/Areloch/Torque3D into development
This commit is contained in:
commit
82c74b4511
549 changed files with 68656 additions and 11 deletions
|
|
@ -137,6 +137,8 @@ void GameObjectAsset::initializeAsset()
|
|||
|
||||
if (Platform::isFile(mScriptFile))
|
||||
Con::executeFile(mScriptFile, false, false);
|
||||
|
||||
mTAMLFile = expandAssetFilePath(mTAMLFile);
|
||||
}
|
||||
|
||||
void GameObjectAsset::onAssetRefresh()
|
||||
|
|
@ -146,6 +148,8 @@ void GameObjectAsset::onAssetRefresh()
|
|||
|
||||
if (Platform::isFile(mScriptFile))
|
||||
Con::executeFile(mScriptFile, false, false);
|
||||
|
||||
mTAMLFile = expandAssetFilePath(mTAMLFile);
|
||||
}
|
||||
|
||||
void GameObjectAsset::setScriptFile(const char* pScriptFile)
|
||||
|
|
@ -161,7 +165,7 @@ void GameObjectAsset::setScriptFile(const char* pScriptFile)
|
|||
return;
|
||||
|
||||
// Update.
|
||||
mScriptFile = getOwned() ? expandAssetFilePath(pScriptFile) : StringTable->insert(pScriptFile);
|
||||
mScriptFile = expandAssetFilePath(pScriptFile);
|
||||
|
||||
// Refresh the asset.
|
||||
refreshAsset();
|
||||
|
|
@ -177,11 +181,11 @@ void GameObjectAsset::setTAMLFile(const char* pTAMLFile)
|
|||
pTAMLFile = StringTable->insert(pTAMLFile);
|
||||
|
||||
// Ignore no change,
|
||||
if (pTAMLFile == mScriptFile)
|
||||
if (pTAMLFile == mTAMLFile)
|
||||
return;
|
||||
|
||||
// Update.
|
||||
mTAMLFile = getOwned() ? expandAssetFilePath(pTAMLFile) : StringTable->insert(pTAMLFile);
|
||||
mTAMLFile = expandAssetFilePath(pTAMLFile);
|
||||
|
||||
// Refresh the asset.
|
||||
refreshAsset();
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ ConsoleSetType(TypeMaterialAssetPtr)
|
|||
MaterialAsset::MaterialAsset()
|
||||
{
|
||||
mShaderGraphFile = "";
|
||||
mScriptFile = "";
|
||||
mMatDefinitionName = "";
|
||||
mScriptFile = StringTable->EmptyString();
|
||||
mMatDefinitionName = StringTable->EmptyString();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -111,7 +111,7 @@ void MaterialAsset::initPersistFields()
|
|||
addProtectedField("scriptFile", TypeAssetLooseFilePath, Offset(mScriptFile, MaterialAsset),
|
||||
&setScriptFile, &getScriptFile, "Path to the file containing the material definition.");
|
||||
|
||||
addField("materialDefinitionName", TypeRealString, Offset(mMatDefinitionName, MaterialAsset), "Name of the material definition this asset is for.");
|
||||
addField("materialDefinitionName", TypeString, Offset(mMatDefinitionName, MaterialAsset), "Name of the material definition this asset is for.");
|
||||
}
|
||||
|
||||
void MaterialAsset::initializeAsset()
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class MaterialAsset : public AssetBase
|
|||
typedef AssetBase Parent;
|
||||
|
||||
String mShaderGraphFile;
|
||||
String mScriptFile;
|
||||
StringTableEntry mScriptFile;
|
||||
StringTableEntry mMatDefinitionName;
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue