mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-26 15:49:30 +00:00
Adds test shapes of Kork and SpaceOrc
Sidestep of memleak from CSF at the moment Minor fixes and corrections with asset importing and loose files WIP of updated options menu
This commit is contained in:
parent
6eb997c449
commit
6073bc5551
41 changed files with 804 additions and 193 deletions
|
|
@ -149,12 +149,12 @@ void ImageAsset::loadImage()
|
|||
|
||||
void ImageAsset::initializeAsset()
|
||||
{
|
||||
loadImage();
|
||||
setImageFileName(mImageFileName);
|
||||
}
|
||||
|
||||
void ImageAsset::onAssetRefresh()
|
||||
{
|
||||
loadImage();
|
||||
setImageFileName(mImageFileName);
|
||||
}
|
||||
|
||||
void ImageAsset::setImageFileName(const char* pScriptFile)
|
||||
|
|
@ -162,16 +162,16 @@ void ImageAsset::setImageFileName(const char* pScriptFile)
|
|||
// Sanity!
|
||||
AssertFatal(pScriptFile != NULL, "Cannot use a NULL image file.");
|
||||
|
||||
// Fetch image file.
|
||||
pScriptFile = StringTable->insert(pScriptFile);
|
||||
|
||||
// Ignore no change,
|
||||
if (pScriptFile == mImageFileName)
|
||||
return;
|
||||
|
||||
// Update.
|
||||
mImageFileName = getOwned() ? expandAssetFilePath(pScriptFile) : StringTable->insert(pScriptFile);
|
||||
|
||||
// Refresh the asset.
|
||||
refreshAsset();
|
||||
loadImage();
|
||||
}
|
||||
|
||||
DefineEngineMethod(ImageAsset, getImageFilename, const char*, (), ,
|
||||
"Creates an instance of the given GameObject given the asset definition.\n"
|
||||
"@return The GameObject entity created from the asset.")
|
||||
{
|
||||
return object->getImageFileName();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue