Default behaviour without precision on name
Former-commit-id: 984e99a8ce5380eb54aa48e206a62186a08cce23
This commit is contained in:
parent
4e2072afee
commit
a2c0963fe4
|
|
@ -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