mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Shifts the console method for manually invoking load() from being ShapeAsset specific to being generalized to AssetBase
This commit is contained in:
parent
1277b1a347
commit
6b3fcd8e74
2 changed files with 8 additions and 6 deletions
|
|
@ -755,12 +755,6 @@ DefineEngineMethod(ShapeAsset, getStatusString, String, (), , "get status string
|
||||||
return ShapeAsset::getAssetErrstrn(object->getStatus());
|
return ShapeAsset::getAssetErrstrn(object->getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod(ShapeAsset, load, String, (), , "get status string")\
|
|
||||||
{
|
|
||||||
U32 code = object->load();
|
|
||||||
return ShapeAsset::getAssetErrstrn(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef TORQUE_TOOLS
|
#ifdef TORQUE_TOOLS
|
||||||
DefineEngineMethod(ShapeAsset, generateCachedPreviewImage, const char*, (S32 resolution, const char* overrideMaterialName), (256, ""),
|
DefineEngineMethod(ShapeAsset, generateCachedPreviewImage, const char*, (S32 resolution, const char* overrideMaterialName), (256, ""),
|
||||||
"Generates a baked preview image of the given shapeAsset. Only really used for generating Asset Browser icons.\n"
|
"Generates a baked preview image of the given shapeAsset. Only really used for generating Asset Browser icons.\n"
|
||||||
|
|
|
||||||
|
|
@ -92,3 +92,11 @@ DefineEngineMethod(AssetBase, getStatusString, const char*, (), ,
|
||||||
{
|
{
|
||||||
return object->getAssetErrstrn(object->getStatus());
|
return object->getAssetErrstrn(object->getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DefineEngineMethod(AssetBase, load, String, (), ,
|
||||||
|
"Manually initates a loading of the asset and it's contents.\n"
|
||||||
|
"@return The status code of the loading results.\n")\
|
||||||
|
{
|
||||||
|
U32 code = object->load();
|
||||||
|
return object->getAssetErrstrn(code);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue