Default behaviour without precision on name
Former-commit-id: 28959f509e5baee43109a66e17a8703a480288e4
This commit is contained in:
parent
9f14f63ce8
commit
a81cc4a295
|
|
@ -27,6 +27,12 @@ namespace Nz
|
|||
String filePath;
|
||||
if (matData.GetStringParameter(MaterialData::FilePath, &filePath))
|
||||
{
|
||||
if (!File::Exists(filePath))
|
||||
{
|
||||
NazaraWarning("Shader name does not refer to an existing file, \".tga\" is used by default");
|
||||
filePath += ".tga";
|
||||
}
|
||||
|
||||
MaterialRef material = Material::New();
|
||||
if (material->LoadFromFile(filePath, parameters.material))
|
||||
model->SetMaterial(i, std::move(material));
|
||||
|
|
|
|||
Loading…
Reference in New Issue