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:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user