[Bf-blender-cvs] [f5128f219f3] master: Cleanup: Use simpler check for Bezier curves

Hans Goudey noreply at git.blender.org
Fri Nov 18 20:43:20 CET 2022


Commit: f5128f219f3fede7be21b4a7e69a172c7f50f5b0
Author: Hans Goudey
Date:   Thu Nov 17 16:17:08 2022 -0600
Branches: master
https://developer.blender.org/rBf5128f219f3fede7be21b4a7e69a172c7f50f5b0

Cleanup: Use simpler check for Bezier curves

===================================================================

M	source/blender/blenkernel/intern/curves_geometry.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index 18b6cdc2691..e4bd0527b6a 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -956,13 +956,13 @@ static void transform_positions(MutableSpan<float3> positions, const float4x4 &m
 
 void CurvesGeometry::calculate_bezier_auto_handles()
 {
-  const VArray<int8_t> types = this->curve_types();
-  if (types.is_single() && types.get_internal_single() != CURVE_TYPE_BEZIER) {
+  if (!this->has_curve_with_type(CURVE_TYPE_BEZIER)) {
     return;
   }
   if (this->handle_positions_left().is_empty() || this->handle_positions_right().is_empty()) {
     return;
   }
+  const VArray<int8_t> types = this->curve_types();
   const VArray<bool> cyclic = this->cyclic();
   const VArraySpan<int8_t> types_left{this->handle_types_left()};
   const VArraySpan<int8_t> types_right{this->handle_types_right()};



More information about the Bf-blender-cvs mailing list