Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curves_geometry.cc
| Show First 20 Lines • Show All 851 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void CurvesGeometry::calculate_bezier_auto_handles() | void CurvesGeometry::calculate_bezier_auto_handles() | ||||
| { | { | ||||
| const VArray<int8_t> types = std::as_const(*this).curve_types(); | const VArray<int8_t> types = std::as_const(*this).curve_types(); | ||||
| if (types.is_single() && types.get_internal_single() != CURVE_TYPE_BEZIER) { | if (types.is_single() && types.get_internal_single() != CURVE_TYPE_BEZIER) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (std::as_const(*this).handle_positions_left().is_empty() || | |||||
| std::as_const(*this).handle_positions_right().is_empty()) { | |||||
| return; | |||||
| } | |||||
| const VArray<bool> cyclic = std::as_const(*this).cyclic(); | const VArray<bool> cyclic = std::as_const(*this).cyclic(); | ||||
| const Span<int8_t> types_left = this->handle_types_left(); | const Span<int8_t> types_left = this->handle_types_left(); | ||||
| const Span<int8_t> types_right = this->handle_types_right(); | const Span<int8_t> types_right = this->handle_types_right(); | ||||
| const Span<float3> positions = this->positions(); | const Span<float3> positions = this->positions(); | ||||
| MutableSpan<float3> positions_left = this->handle_positions_left(); | MutableSpan<float3> positions_left = this->handle_positions_left(); | ||||
| MutableSpan<float3> positions_right = this->handle_positions_right(); | MutableSpan<float3> positions_right = this->handle_positions_right(); | ||||
| threading::parallel_for(this->curves_range(), 128, [&](IndexRange range) { | threading::parallel_for(this->curves_range(), 128, [&](IndexRange range) { | ||||
| ▲ Show 20 Lines • Show All 422 Lines • Show Last 20 Lines | |||||