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/io/alembic/intern/abc_reader_nurbs.cc')
-rw-r--r--source/blender/io/alembic/intern/abc_reader_nurbs.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/io/alembic/intern/abc_reader_nurbs.cc b/source/blender/io/alembic/intern/abc_reader_nurbs.cc
index 25567aa8c24..4492d1e1ca0 100644
--- a/source/blender/io/alembic/intern/abc_reader_nurbs.cc
+++ b/source/blender/io/alembic/intern/abc_reader_nurbs.cc
@@ -71,6 +71,26 @@ bool AbcNurbsReader::valid() const
return true;
}
+bool AbcNurbsReader::accepts_object_type(
+ const Alembic::AbcCoreAbstract::v12::ObjectHeader &alembic_header,
+ const Object *const ob,
+ const char **err_str) const
+{
+ if (!Alembic::AbcGeom::INuPatch::matches(alembic_header)) {
+ *err_str =
+ "Object type mismatch, Alembic object path pointed to NURBS when importing, but not any "
+ "more.";
+ return false;
+ }
+
+ if (ob->type != OB_CURVE) {
+ *err_str = "Object type mismatch, Alembic object path points to NURBS.";
+ return false;
+ }
+
+ return true;
+}
+
static bool set_knots(const FloatArraySamplePtr &knots, float *&nu_knots)
{
if (!knots || knots->size() < 2) {