[Bf-blender-cvs] [9954cce59f5] master: Alembic: catch weird exceptions from library instead of aborting Blender.
Bastien Montagne
noreply at git.blender.org
Thu Apr 18 16:20:26 CEST 2019
Commit: 9954cce59f540e62ae65587098ad4ca724734a89
Author: Bastien Montagne
Date: Thu Apr 18 16:19:17 2019 +0200
Branches: master
https://developer.blender.org/rB9954cce59f540e62ae65587098ad4ca724734a89
Alembic: catch weird exceptions from library instead of aborting Blender.
Similar to what is done e.g. in AbcMeshReader::read_mesh()...
===================================================================
M source/blender/alembic/intern/abc_object.cc
===================================================================
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index dddd985d796..36daa50e095 100644
--- a/source/blender/alembic/intern/abc_object.cc
+++ b/source/blender/alembic/intern/abc_object.cc
@@ -273,7 +273,15 @@ Alembic::AbcGeom::IXform AbcObjectReader::xform()
{
/* Check that we have an empty object (locator, bone head/tail...). */
if (IXform::matches(m_iobject.getMetaData())) {
- return IXform(m_iobject, Alembic::AbcGeom::kWrapExisting);
+ try {
+ return IXform(m_iobject, Alembic::AbcGeom::kWrapExisting);
+ }
+ catch (Alembic::Util::Exception &ex) {
+ printf("Alembic: error reading object transform for '%s': %s\n",
+ m_iobject.getFullName().c_str(),
+ ex.what());
+ return IXform();
+ }
}
/* Check that we have an object with actual data, in which case the
@@ -282,7 +290,15 @@ Alembic::AbcGeom::IXform AbcObjectReader::xform()
/* The archive's top object can be recognised by not having a parent. */
if (abc_parent.getParent() && IXform::matches(abc_parent.getMetaData())) {
- return IXform(abc_parent, Alembic::AbcGeom::kWrapExisting);
+ try {
+ return IXform(abc_parent, Alembic::AbcGeom::kWrapExisting);
+ }
+ catch (Alembic::Util::Exception &ex) {
+ printf("Alembic: error reading object transform for '%s': %s\n",
+ abc_parent.getFullName().c_str(),
+ ex.what());
+ return IXform();
+ }
}
/* This can happen in certain cases. For example, MeshLab exports
More information about the Bf-blender-cvs
mailing list