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/exporter/abc_writer_nurbs.cc')
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_nurbs.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
index de1870fefd9..ce451eb1428 100644
--- a/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_nurbs.cc
@@ -78,11 +78,22 @@ OObject ABCNurbsWriter::get_alembic_object() const
return abc_nurbs_[0];
}
+Alembic::Abc::OCompoundProperty ABCNurbsWriter::abc_prop_for_custom_props()
+{
+ if (abc_nurbs_.empty()) {
+ return Alembic::Abc::OCompoundProperty();
+ }
+
+ /* A single NURBS object in Blender is expanded to multiple curves in Alembic.
+ * Just store the custom properties on the first one for simplicity. */
+ return abc_schema_prop_for_custom_props(abc_nurbs_schemas_[0]);
+}
+
bool ABCNurbsWriter::check_is_animated(const HierarchyContext &context) const
{
/* Check if object has shape keys. */
Curve *cu = static_cast<Curve *>(context.object->data);
- return (cu->key != NULL);
+ return (cu->key != nullptr);
}
bool ABCNurbsWriter::is_supported(const HierarchyContext *context) const
@@ -115,7 +126,7 @@ void ABCNurbsWriter::do_write(HierarchyContext &context)
Curve *curve = static_cast<Curve *>(context.object->data);
ListBase *nulb;
- if (context.object->runtime.curve_cache->deformed_nurbs.first != NULL) {
+ if (context.object->runtime.curve_cache->deformed_nurbs.first != nullptr) {
nulb = &context.object->runtime.curve_cache->deformed_nurbs;
}
else {