From ab30f085b42bd9356385d4d4cc417aad054f5ec2 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Thu, 12 Jan 2023 10:40:18 -0800 Subject: [PATCH] Simpler VMobject.get_num_curves --- manimlib/mobject/types/vectorized_mobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/mobject/types/vectorized_mobject.py b/manimlib/mobject/types/vectorized_mobject.py index a05e627d..bd83901e 100644 --- a/manimlib/mobject/types/vectorized_mobject.py +++ b/manimlib/mobject/types/vectorized_mobject.py @@ -683,7 +683,7 @@ class VMobject(Mobject): return bezier(self.get_nth_curve_points(n)) def get_num_curves(self) -> int: - return max((len(self.get_points()) - 1) // 2, 0) + return len(self.data["points"]) // 2 def quick_point_from_proportion(self, alpha: float) -> Vect3: # Assumes all curves have the same length, so is inaccurate