mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
Added utility methods to AssetBase:
getAssetDependencyFieldCount clearAssetDependencyFields addAssetDependencyField saveAsset Updated the saveAsset function for terrain block to utilize utility methods to ensure the terrain asset's material dependencies, so they will load properly.
This commit is contained in:
parent
906c7095f1
commit
d8cc73f5a1
6 changed files with 120 additions and 100 deletions
|
|
@ -1,4 +1,4 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2013 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
|
@ -39,3 +39,31 @@ DefineEngineMethod(AssetBase, getAssetId, String, (), ,
|
|||
{
|
||||
return object->getAssetId();
|
||||
}
|
||||
|
||||
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")
|
||||
{
|
||||
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")
|
||||
{
|
||||
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")
|
||||
{
|
||||
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")
|
||||
{
|
||||
return object->saveAsset();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue