Fixed major bug when generating new meta files for materials #254
|
@ -52,7 +52,7 @@ namespace SHADE
|
|||
std::ifstream file{ path.string(), std::ios::in | std::ios::binary };
|
||||
if (!file.is_open())
|
||||
{
|
||||
SHLOG_ERROR("Unable to open SHMesh File: {}", path.string());
|
||||
SHLOG_ERROR("[Model Loader] Unable to open SHModel File: {}", path.string());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace SHADE
|
|||
|
||||
if (!file.is_open())
|
||||
{
|
||||
SHLOG_ERROR("Unable to open text File: {}", path.string());
|
||||
SHLOG_ERROR("[Text Loader] Unable to open text File: {}", path.string());
|
||||
return nullptr;
|
||||
}
|
||||
std::stringstream stream;
|
||||
|
@ -70,7 +70,7 @@ namespace SHADE
|
|||
|
||||
if (!file.is_open())
|
||||
{
|
||||
SHLOG_ERROR("Unable to open text File: {}", path.string());
|
||||
SHLOG_ERROR("[Text Loader] Unable to open text File: {}", path.string());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace SHADE
|
|||
std::ifstream file{ path.string(), std::ios::in | std::ios::binary };
|
||||
if (!file.is_open())
|
||||
{
|
||||
SHLOG_ERROR("Error opening SHTexture file: {}", path.string());
|
||||
SHLOG_ERROR("[Texture Loader] Error opening SHTexture file: {}", path.string());
|
||||
}
|
||||
|
||||
auto const intBytes{ sizeof(uint32_t) };
|
||||
|
@ -61,7 +61,7 @@ namespace SHADE
|
|||
std::ofstream file{ path, std::ios::out | std::ios::binary };
|
||||
if (!file.is_open())
|
||||
{
|
||||
SHLOG_ERROR("Unable to open file for writing texture file: {}", path.string());
|
||||
SHLOG_ERROR("[Texture Loader] Unable to open file for writing texture file: {}", path.string());
|
||||
}
|
||||
|
||||
auto asset = *dynamic_cast<SHTextureAsset const*>(data);
|
||||
|
|
|
@ -197,7 +197,7 @@ namespace SHADE
|
|||
break;
|
||||
|
||||
default:
|
||||
SHLOG_ERROR("Asset type of {} not an internal asset type, cannot be created", name);
|
||||
SHLOG_ERROR("[Asset Manager] Asset type of {} not an internal asset type, cannot be created", name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -249,14 +249,14 @@ namespace SHADE
|
|||
return true;
|
||||
}
|
||||
|
||||
SHLOG_ERROR("Asset data has not been written into, cannot be saved: {}",
|
||||
SHLOG_ERROR("[Asset Manager] Asset data has not been written into, cannot be saved: {}",
|
||||
asset.path.filename().string());
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SHLOG_WARNING("Asset id: {} not an internal asset type, save cannot be triggered", id);
|
||||
SHLOG_WARNING("[Asset Manager] Asset id: {} not an internal asset type, save cannot be triggered", id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -274,10 +274,10 @@ namespace SHADE
|
|||
{
|
||||
return (DeleteLocalFile(asset.path) && DeleteLocalFile(asset.path.string() + META_EXTENSION.data()));
|
||||
}
|
||||
SHLOG_WARNING("Asset id: {} not an internal asset type, file deletion not allowed", id);
|
||||
SHLOG_WARNING("[Asset Manager] Asset id: {} not an internal asset type, file deletion not allowed", id);
|
||||
}
|
||||
|
||||
SHLOG_WARNING("Asset id does not exist, nothing was deleted: {}", id);
|
||||
SHLOG_WARNING("[Asset Manager] Asset id does not exist, nothing was deleted: {}", id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ namespace SHADE
|
|||
std::filesystem::path const newPath{ GenerateLocalPath(path) };
|
||||
if (newPath.empty())
|
||||
{
|
||||
SHLOG_WARNING("Unsupported file format for asset: {}", path.string());
|
||||
SHLOG_WARNING("[Asset Manager] Unsupported file format for asset: {}", path.string());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ namespace SHADE
|
|||
{
|
||||
if (!std::filesystem::exists(path))
|
||||
{
|
||||
SHLOG_ERROR("Path provided does not point to a file: {}", path.string());
|
||||
SHLOG_ERROR("[Asset Manager] Path provided does not point to a file: {}", path.string());
|
||||
return;
|
||||
}
|
||||
AssetPath newPath;
|
||||
|
@ -387,14 +387,14 @@ namespace SHADE
|
|||
auto pathGen = SHTextureCompiler::CompileTextureAsset(path);
|
||||
if (!pathGen.has_value())
|
||||
{
|
||||
SHLOG_ERROR("Texture Compilation Failed for: {}", path.string());
|
||||
SHLOG_ERROR("[Asset Manager] Texture Compilation Failed for: {}", path.string());
|
||||
return;
|
||||
}
|
||||
newPath = pathGen.value();
|
||||
}
|
||||
else
|
||||
{
|
||||
SHLOG_WARNING("File Type compilation not yet Implemented: {}", path.string());
|
||||
SHLOG_WARNING("[Asset Manager] File Type compilation not yet Implemented: {}", path.string());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ namespace SHADE
|
|||
SHAssetData* data = loaders[static_cast<size_t>(asset.type)]->Load(asset.path);
|
||||
if (data == nullptr)
|
||||
{
|
||||
SHLOG_ERROR("Unable to load asset into memory: {}\n", asset.path.string());
|
||||
SHLOG_ERROR("[Asset Manager] Unable to load asset into memory: {}\n", asset.path.string());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -496,7 +496,7 @@ namespace SHADE
|
|||
|
||||
if (parentData == nullptr)
|
||||
{
|
||||
SHLOG_ERROR("Unable to load asset into memory: {}\n", parent.path.string());
|
||||
SHLOG_ERROR("[Asset Manager] Unable to load asset into memory: {}\n", parent.path.string());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue