Commit f2ccb5a0 authored by MURRAY David's avatar MURRAY David
Browse files

modification to use correctly use material based on name

parent 11f67960
......@@ -1528,7 +1528,7 @@ bool SceneParser::addMaterial(XMLElement *a_mat_element, mrf::rendering::Scene &
if (_brdf_map.count(name) == 1)
{
_loger->info("Material " + name + " is already in the list.");
return false;
//return false;
}
std::string type;
......@@ -2752,7 +2752,8 @@ void SceneParser::parseMultiMaterial(
std::string name(material->Attribute(SceneLexer::NAME_AT));
unsigned int mat_index;
material->QueryUnsignedAttribute(SceneLexer::INDEX_AT, &mat_index);
addMaterial(material, scene);
if (_brdf_map.count(name) != 1)
addMaterial(material, scene);
multi_mat->addEntry(_brdf_map[name], mat_index, name);
}
//TODO
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment