Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/curve_eval.cc
| Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | blender::Array<float> CurveEval::accumulated_spline_lengths() const | ||||
| for (const int i : splines_.index_range()) { | for (const int i : splines_.index_range()) { | ||||
| spline_lengths[i] = spline_length; | spline_lengths[i] = spline_length; | ||||
| spline_length += splines_[i]->length(); | spline_length += splines_[i]->length(); | ||||
| } | } | ||||
| spline_lengths.last() = spline_length; | spline_lengths.last() = spline_length; | ||||
| return spline_lengths; | return spline_lengths; | ||||
| } | } | ||||
| void CurveEval::mark_cache_invalid() | |||||
| { | |||||
| for (SplinePtr &spline : splines_) { | |||||
| spline->mark_cache_invalid(); | |||||
| } | |||||
| } | |||||
| static BezierSpline::HandleType handle_type_from_dna_bezt(const eBezTriple_Handle dna_handle_type) | static BezierSpline::HandleType handle_type_from_dna_bezt(const eBezTriple_Handle dna_handle_type) | ||||
| { | { | ||||
| switch (dna_handle_type) { | switch (dna_handle_type) { | ||||
| case HD_FREE: | case HD_FREE: | ||||
| return BezierSpline::HandleType::Free; | return BezierSpline::HandleType::Free; | ||||
| case HD_AUTO: | case HD_AUTO: | ||||
| return BezierSpline::HandleType::Auto; | return BezierSpline::HandleType::Auto; | ||||
| case HD_VECT: | case HD_VECT: | ||||
| ▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines | |||||