From 6b3fcd8e7490208205290cba5463ff2779257964 Mon Sep 17 00:00:00 2001 From: JeffR Date: Mon, 13 Oct 2025 08:13:37 -0500 Subject: [PATCH] Shifts the console method for manually invoking load() from being ShapeAsset specific to being generalized to AssetBase --- Engine/source/T3D/assets/ShapeAsset.cpp | 6 ------ Engine/source/assets/assetBase_ScriptBinding.h | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index 90c0eaa81..2bb03dbb8 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -755,12 +755,6 @@ DefineEngineMethod(ShapeAsset, getStatusString, String, (), , "get status string return ShapeAsset::getAssetErrstrn(object->getStatus()); } -DefineEngineMethod(ShapeAsset, load, String, (), , "get status string")\ -{ - U32 code = object->load(); - return ShapeAsset::getAssetErrstrn(code); -} - #ifdef TORQUE_TOOLS 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" diff --git a/Engine/source/assets/assetBase_ScriptBinding.h b/Engine/source/assets/assetBase_ScriptBinding.h index f326f6711..b2d6bb022 100644 --- a/Engine/source/assets/assetBase_ScriptBinding.h +++ b/Engine/source/assets/assetBase_ScriptBinding.h @@ -92,3 +92,11 @@ DefineEngineMethod(AssetBase, getStatusString, const char*, (), , { 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); +}