Alembic import: be more lenient towards unknown object types.

Alembic is an interchange and caching format, that can contain custom
object schemas. Blender shouldn't crash (because of failing asserts) just
because it doesn't know such an object type.
This commit is contained in:
Sybren A. Stüvel
2017-02-23 15:54:46 +01:00
parent aba7759992
commit e4367ccb78
2 changed files with 7 additions and 5 deletions

View File

@@ -366,7 +366,10 @@ AbcObjectReader *create_reader(const Alembic::AbcGeom::IObject &object, ImportSe
reader = new AbcCurveReader(object, settings);
}
else {
assert(false);
std::cerr << "Alembic: unknown how to handle objects of schema "
<< md.get("schemaObjTitle")
<< ", skipping object "
<< object.getFullName() << std::endl;
}
return reader;

View File

@@ -502,11 +502,10 @@ static bool visit_object(const IObject &object,
parent_is_part_of_this_object = true;
}
else {
std::cerr << "object is of unsupported schema type "
<< "'" << object.getMetaData().get("schemaObjTitle") << "'"
std::cerr << "Alembic object " << full_name
<< " is of unsupported schema type '"
<< object.getMetaData().get("schemaObjTitle") << "'"
<< std::endl;
BLI_assert(false);
return false;
}
if (reader) {