Fix: Empty id attribute on curve control points

No virtual array should be returned instead of returning an empty span.
This commit is contained in:
Hans Goudey 2021-10-20 17:45:14 -05:00
parent 3f8b45d8d1
commit 6b761c59d2
1 changed files with 8 additions and 0 deletions

View File

@ -1104,6 +1104,10 @@ template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttribu
return {};
}
if (!this->exists(component)) {
return {};
}
Span<SplinePtr> splines = curve->splines();
if (splines.size() == 1) {
return std::make_unique<fn::GVArray_For_GSpan>(get_span_(*splines.first()));
@ -1125,6 +1129,10 @@ template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttribu
return {};
}
if (!this->exists(component)) {
return {};
}
MutableSpan<SplinePtr> splines = curve->splines();
if (splines.size() == 1) {
return std::make_unique<fn::GVMutableArray_For_GMutableSpan>(