Merge branch 'Standardized_AB_AssetManagement' of https://github.com/Areloch/Torque3D into development

This commit is contained in:
JeffR 2025-03-30 15:03:43 -05:00
commit c2af4e578b
39 changed files with 1921 additions and 3659 deletions

View file

@ -178,3 +178,17 @@ void CppAsset::onAssetRefresh(void)
mHeaderPath = getOwned() ? expandAssetFilePath(mHeaderFile) : mHeaderPath;
}
DefineEngineMethod(CppAsset, getCodePath, const char*, (), ,
"Gets the code file filepath of this asset.\n"
"@return File path of the code file.")
{
return object->getCppFilePath();
}
DefineEngineMethod(CppAsset, getHeaderPath, const char*, (), ,
"Gets the header file filepath of this asset.\n"
"@return File path of the header file.")
{
return object->getHeaderFilePath();
}

View file

@ -66,6 +66,9 @@ public:
void setHeaderFile(const char* pHeaderFile);
inline StringTableEntry getHeaderFile(void) const { return mHeaderFile; };
inline StringTableEntry getCppFilePath(void) const { return mCodePath; };
inline StringTableEntry getHeaderFilePath(void) const { return mHeaderPath; };
protected:
void initializeAsset(void) override;
void onAssetRefresh(void) override;
@ -73,9 +76,6 @@ protected:
static bool setCppFile(void *obj, const char *index, const char *data) { static_cast<CppAsset*>(obj)->setCppFile(data); return false; }
static const char* getCppFile(void* obj, const char* data) { return static_cast<CppAsset*>(obj)->getCppFile(); }
inline StringTableEntry getCppFilePath(void) const { return mCodePath; };
inline StringTableEntry getHeaderFilePath(void) const { return mHeaderPath; };
static bool setHeaderFile(void *obj, const char *index, const char *data) { static_cast<CppAsset*>(obj)->setHeaderFile(data); return false; }
static const char* getHeaderFile(void* obj, const char* data) { return static_cast<CppAsset*>(obj)->getHeaderFile(); }
};