Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-04-18 17:19:17 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-04-18 17:20:19 +0300
commit9954cce59f540e62ae65587098ad4ca724734a89 (patch)
tree28a2f5c84a27417245a39f26f36b79e4b1ca3080 /source/blender/alembic
parent7d78474941523705fa6cb4305f6ac30bce6bd1ce (diff)
Alembic: catch weird exceptions from library instead of aborting Blender.
Similar to what is done e.g. in AbcMeshReader::read_mesh()...
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_object.cc20
1 files changed, 18 insertions, 2 deletions
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