[Bf-blender-cvs] [6b761c59d25] master: Fix: Empty id attribute on curve control points
Hans Goudey
noreply at git.blender.org
Thu Oct 21 00:45:24 CEST 2021
Commit: 6b761c59d25855080de683d15837f31172745f43
Author: Hans Goudey
Date: Wed Oct 20 17:45:14 2021 -0500
Branches: master
https://developer.blender.org/rB6b761c59d25855080de683d15837f31172745f43
Fix: Empty id attribute on curve control points
No virtual array should be returned instead of returning an empty span.
===================================================================
M source/blender/blenkernel/intern/geometry_component_curve.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 2f2851b4fd4..f30ff2a70a7 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -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>(
More information about the Bf-blender-cvs
mailing list