mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 05:45:40 +00:00
Misc fixes to ensure that the default postFX save, load and editing process is valid
Also fixes it so if a level asset doesn't point to a valid postfx preset file, it'll generate a clean one on save
This commit is contained in:
parent
302a64edd1
commit
9ca276fef0
9 changed files with 63 additions and 114 deletions
|
|
@ -41,29 +41,33 @@ DefineEngineMethod(AssetBase, getAssetId, String, (), ,
|
|||
}
|
||||
|
||||
DefineEngineMethod(AssetBase, getAssetDependencyFieldCount, S32, (const char* pFieldName), (""),
|
||||
"Gets the assets' Asset Id. This is only available if the asset was acquired from the asset manager.\n"
|
||||
"@return The assets' Asset Id.\n")
|
||||
"Gets the number of asset dependencies of a given field name.\n"
|
||||
"eg. Would return '2' if you searched for 'myDependencyField'\n"
|
||||
"and the asset had myDependencyField0 and myDependencyField1\n"
|
||||
"@param fieldName The name of the field to get a count of\n"
|
||||
"@return The number of dependency fields matching the search name.\n")
|
||||
{
|
||||
return object->getAssetDependencyFieldCount(pFieldName);
|
||||
}
|
||||
|
||||
DefineEngineMethod(AssetBase, clearAssetDependencyFields, void, (const char* pFieldName), (""),
|
||||
"Gets the assets' Asset Id. This is only available if the asset was acquired from the asset manager.\n"
|
||||
"@return The assets' Asset Id.\n")
|
||||
"Clears any asset dependency fields matching the name provided.\n"
|
||||
"@param fieldName The name of the fields to be cleared")
|
||||
{
|
||||
object->clearAssetDependencyFields(pFieldName);
|
||||
}
|
||||
|
||||
DefineEngineMethod(AssetBase, addAssetDependencyField, void, (const char* pFieldName, const char* pAssetId), ("", ""),
|
||||
"Gets the assets' Asset Id. This is only available if the asset was acquired from the asset manager.\n"
|
||||
"@return The assets' Asset Id.\n")
|
||||
"Adds an asset dependency field to the asset definition.\n"
|
||||
"@param fieldName The name of the field. Will automatically increment the tailing number if the field is used multiple times\n"
|
||||
"@param assetId The assetId to be marked as a dependency")
|
||||
{
|
||||
object->addAssetDependencyField(pFieldName, pAssetId);
|
||||
}
|
||||
|
||||
DefineEngineMethod(AssetBase, saveAsset, bool, (), ,
|
||||
"Gets the assets' Asset Id. This is only available if the asset was acquired from the asset manager.\n"
|
||||
"@return The assets' Asset Id.\n")
|
||||
"Saves the asset definition.\n"
|
||||
"@return Whether the save was successful.\n")
|
||||
{
|
||||
return object->saveAsset();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue