Separated ShapeAsset's fileName for the loose file name and the fully processed file path to avoid potential save-out problems

Fixed autoAssetImport so it properly cleared any prior import session objects
Added beginning and ending comment line signfiers to make import logging easier to spot in console
Fixed variable used when doing the actual import on assets where it would use the top-level asset import objects and not the children array, causing a crash
Fixed the Make Selected A Mesh logic to work with the creation of a new shapeAsset
Added secondary handling to generate a prefab of the original selection for preservation purposes
Added optional input for makeSelectedPrefab to not delete the original selection(useful for the preservational prefab mentioned above)
Adjusted font color for NA text edit fields to make it more legible
Changed the non-working reloadDatabase button in assetBrowser to instead open the Asset Editing editor settings page.
This commit is contained in:
Areloch 2020-08-07 00:24:26 -05:00
parent 2b686bf713
commit 813762c722
10 changed files with 106 additions and 50 deletions

View file

@ -117,6 +117,8 @@ ShapeAsset::ShapeAsset()
{
mFileName = StringTable->EmptyString();
mConstructorFileName = StringTable->EmptyString();
mFilePath = StringTable->EmptyString();
mConstructorFilePath = StringTable->EmptyString();
}
//-----------------------------------------------------------------------------
@ -163,10 +165,10 @@ void ShapeAsset::initializeAsset()
ResourceManager::get().getChangedSignal().notify(this, &ShapeAsset::_onResourceChanged);
//Ensure our path is expando'd if it isn't already
if (!Platform::isFullPath(mFileName))
mFileName = getOwned() ? expandAssetFilePath(mFileName) : mFileName;
if (!Platform::isFullPath(mFilePath))
mFilePath = getOwned() ? expandAssetFilePath(mFileName) : mFilePath;
mConstructorFileName = expandAssetFilePath(mConstructorFileName);
mConstructorFilePath = expandAssetFilePath(mConstructorFilePath);
loadShape();
}
@ -258,7 +260,7 @@ bool ShapeAsset::loadShape()
}
}
mShape = ResourceManager::get().load(mFileName);
mShape = ResourceManager::get().load(mFilePath);
if (!mShape)
{
@ -439,7 +441,7 @@ void ShapeAsset::onAssetRefresh(void)
// Update.
if(!Platform::isFullPath(mFileName))
mFileName = getOwned() ? expandAssetFilePath(mFileName) : mFileName;
mFilePath = getOwned() ? expandAssetFilePath(mFileName) : mFilePath;
loadShape();
}