mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +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
98c4606b3c
commit
ae857faae2
40 changed files with 765 additions and 182 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