Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/alembic/exporter/abc_writer_nurbs.cc
| Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | OObject ABCNurbsWriter::get_alembic_object() const | ||||
| if (abc_nurbs_.empty()) { | if (abc_nurbs_.empty()) { | ||||
| return OObject(); | return OObject(); | ||||
| } | } | ||||
| /* For parenting purposes within the Alembic file, all NURBS patches are equal, so just use the | /* For parenting purposes within the Alembic file, all NURBS patches are equal, so just use the | ||||
| * first one. */ | * first one. */ | ||||
| return abc_nurbs_[0]; | return abc_nurbs_[0]; | ||||
| } | } | ||||
| Alembic::Abc::OCompoundProperty ABCNurbsWriter::abc_prop_for_custom_props() | |||||
| { | |||||
| if (abc_nurbs_.empty()) { | |||||
| return Alembic::Abc::OCompoundProperty(); | |||||
| } | |||||
sergey: A bit weird to use first scheme.
Sybren says this should not be calling `getUserProperties`… | |||||
| /* 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 | bool ABCNurbsWriter::check_is_animated(const HierarchyContext &context) const | ||||
| { | { | ||||
| /* Check if object has shape keys. */ | /* Check if object has shape keys. */ | ||||
| Curve *cu = static_cast<Curve *>(context.object->data); | Curve *cu = static_cast<Curve *>(context.object->data); | ||||
| return (cu->key != NULL); | return (cu->key != NULL); | ||||
| } | } | ||||
| bool ABCNurbsWriter::is_supported(const HierarchyContext *context) const | bool ABCNurbsWriter::is_supported(const HierarchyContext *context) const | ||||
| ▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines | |||||
A bit weird to use first scheme.
Sybren says this should not be calling getUserProperties, but abc_schema_prop_for_custom_props instead.