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:
Diffstat (limited to 'source/blender/alembic/intern/abc_nurbs.cc')
-rw-r--r--source/blender/alembic/intern/abc_nurbs.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/alembic/intern/abc_nurbs.cc b/source/blender/alembic/intern/abc_nurbs.cc
index 1f042d0bafc..95d06fc5efe 100644
--- a/source/blender/alembic/intern/abc_nurbs.cc
+++ b/source/blender/alembic/intern/abc_nurbs.cc
@@ -60,13 +60,11 @@ using Alembic::AbcGeom::ONuPatchSchema;
/* ************************************************************************** */
-AbcNurbsWriter::AbcNurbsWriter(Depsgraph *depsgraph,
- Scene *scene,
- Object *ob,
+AbcNurbsWriter::AbcNurbsWriter(Object *ob,
AbcTransformWriter *parent,
uint32_t time_sampling,
ExportSettings &settings)
- : AbcObjectWriter(depsgraph, scene, ob, time_sampling, settings, parent)
+ : AbcObjectWriter(ob, time_sampling, settings, parent)
{
m_is_animated = isAnimated();
@@ -255,7 +253,19 @@ void AbcNurbsReader::readObjectData(Main *bmain, const Alembic::Abc::ISampleSele
nu->resolv = cu->resolv;
const INuPatchSchema &schema = it->first;
- const INuPatchSchema::Sample smp = schema.getValue(sample_sel);
+ INuPatchSchema::Sample smp;
+ try {
+ smp = schema.getValue(sample_sel);
+ }
+ catch(Alembic::Util::Exception &ex) {
+ printf("Alembic: error reading nurbs sample for '%s/%s' at time %f: %s\n",
+ m_iobject.getFullName().c_str(),
+ schema.getName().c_str(),
+ sample_sel.getRequestedTime(),
+ ex.what());
+ return;
+ }
+
nu->orderu = smp.getUOrder() - 1;
nu->orderv = smp.getVOrder() - 1;