- fbx: better error reporting reading property tables.

This commit is contained in:
Alexander Gessler
2012-08-25 19:53:46 +02:00
parent c9facf16fa
commit 4921114c7d
5 changed files with 25 additions and 11 deletions

View File

@@ -99,7 +99,8 @@ void DOMWarning(const std::string& message, const Element* element /*= NULL*/)
boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
const std::string& templateName,
const Element &element,
const Scope& sc)
const Scope& sc,
bool no_warn /*= false*/)
{
const Element* const Properties70 = sc["Properties70"];
boost::shared_ptr<const PropertyTable> templateProps = boost::shared_ptr<const PropertyTable>(
@@ -113,7 +114,9 @@ boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
}
if(!Properties70) {
DOMWarning("material property table (Properties70) not found",&element);
if(!no_warn) {
DOMWarning("property table (Properties70) not found",&element);
}
if(templateProps) {
return templateProps;
}