Fix T61935 Crash when importing Alembic from Meshroom
The Alembic importer can now deal with XForm-less objects. Apparently MeshLab exports point clouds without parent transformation matrix (XForm in Alembic-speak). We shouldn't warn about this, but handle it properly instead.
This commit is contained in:
@@ -290,12 +290,8 @@ Alembic::AbcGeom::IXform AbcObjectReader::xform()
|
|||||||
return IXform(abc_parent, Alembic::AbcGeom::kWrapExisting);
|
return IXform(abc_parent, Alembic::AbcGeom::kWrapExisting);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should not happen. */
|
/* This can happen in certain cases. For example, MeshLab exports
|
||||||
std::cerr << "AbcObjectReader::xform(): "
|
* point clouds without parent XForm. */
|
||||||
<< "unable to find IXform for Alembic object '"
|
|
||||||
<< m_iobject.getFullName() << "'\n";
|
|
||||||
BLI_assert(false);
|
|
||||||
|
|
||||||
return IXform();
|
return IXform();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,6 +300,8 @@ void AbcObjectReader::read_matrix(float r_mat[4][4], const float time,
|
|||||||
{
|
{
|
||||||
IXform ixform = xform();
|
IXform ixform = xform();
|
||||||
if (!ixform) {
|
if (!ixform) {
|
||||||
|
unit_m4(r_mat);
|
||||||
|
is_constant = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user