mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
Skip material loading for other types than 2d
This commit is contained in:
parent
347c1b3d68
commit
028d8fde7d
@ -17,6 +17,10 @@ using namespace IW4;
|
||||
|
||||
namespace IW4
|
||||
{
|
||||
class SkipMaterialException final : public std::exception
|
||||
{
|
||||
};
|
||||
|
||||
class MaterialGdtLoader : AbstractGdtEntryReader
|
||||
{
|
||||
public:
|
||||
@ -121,10 +125,14 @@ namespace IW4
|
||||
|
||||
void mtl_phong_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_ambient_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_2d_template()
|
||||
@ -143,38 +151,56 @@ namespace IW4
|
||||
|
||||
void mtl_unlit_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_unlit_deprecated_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_effect_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_distortion_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_particlecloud_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_tools_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_sky_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_water_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_objective_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void custom_template()
|
||||
@ -223,34 +249,50 @@ namespace IW4
|
||||
|
||||
void mtl_custom_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_phong_flag_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_grain_overlay_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_effect_eyeoffset_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_reflexsight_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_shadowclear_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_shadowoverlay_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void mtl_splatter_template()
|
||||
{
|
||||
// TODO
|
||||
throw SkipMaterialException();
|
||||
}
|
||||
|
||||
void commonsetup_template()
|
||||
@ -973,6 +1015,10 @@ bool AssetLoaderMaterial::LoadFromGdt(const std::string& assetName, IGdtQueryabl
|
||||
if (loader.Load())
|
||||
manager->AddAsset(ASSET_TYPE_MATERIAL, assetName, loader.GetMaterial(), loader.GetDependencies(), std::vector<scr_string_t>());
|
||||
}
|
||||
catch(const SkipMaterialException&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
catch (const GdtReadingException& e)
|
||||
{
|
||||
std::cerr << "Error while trying to load material from gdt: " << e.what() << " @ GdtEntry \"" << entry->m_name << "\"\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user