mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Made a bunch of changes to make the resource store system more friendly to multiple stores instead of just a single active one, and set up a resource database for editor assets
This commit is contained in:
@@ -564,8 +564,9 @@ CScriptTemplate* CTemplateLoader::LoadScriptTemplate(XMLDocument *pDoc, const TS
|
||||
// Validate file asset
|
||||
else
|
||||
{
|
||||
TString Path = "../resources/" + ID;
|
||||
if (!FileUtil::Exists(Path))
|
||||
CResourceEntry *pEntry = gpEditorStore->FindEntry(ID);
|
||||
|
||||
if (!pEntry)
|
||||
{
|
||||
Log::Error(rkTemplateName + ": Invalid file for " + Type + " asset: " + ID);
|
||||
pAsset = pAsset->NextSiblingElement();
|
||||
|
||||
@@ -718,7 +718,7 @@ void CUnsupportedParticleLoader::ParseIntFunction(IInputStream& rFile)
|
||||
case kIntCNST:
|
||||
{
|
||||
u32 Value = rFile.ReadLong();
|
||||
ASSERT(gpResourceStore->FindEntry(Value) == nullptr);
|
||||
ASSERT(gpResourceStore->FindEntry(CAssetID(Value)) == nullptr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,10 +164,7 @@ CResource* CScriptTemplate::FindDisplayAsset(CPropertyStruct *pProperties, u32&
|
||||
|
||||
// File
|
||||
if (it->AssetSource == SEditorAsset::eFile)
|
||||
{
|
||||
TString Path = "../resources/" + it->AssetLocation;
|
||||
pRes = gpResourceStore->LoadResource(Path);
|
||||
}
|
||||
pRes = gpEditorStore->LoadResource(it->AssetLocation);
|
||||
|
||||
// Property
|
||||
else
|
||||
@@ -214,10 +211,7 @@ CCollisionMeshGroup* CScriptTemplate::FindCollision(CPropertyStruct *pProperties
|
||||
|
||||
// File
|
||||
if (it->AssetSource == SEditorAsset::eFile)
|
||||
{
|
||||
TString path = "../resources/" + it->AssetLocation;
|
||||
pRes = gpResourceStore->LoadResource(path);
|
||||
}
|
||||
pRes = gpResourceStore->LoadResource(it->AssetLocation);
|
||||
|
||||
// Property
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user