mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-25 06:15:36 +00:00
Updates most of the handling of asset types to follow a more standardized type-registration system.
This streamlines much of the code and makes it easier to find and follow how different asset, object and file types are handled by the asset browser Also clears out various bits of cruft and old commented blocks of code
This commit is contained in:
parent
00e5482733
commit
3442aceb0f
39 changed files with 1920 additions and 3537 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue