From 0d433b075edd4e4d926b16c184eb0ce06abfa76e Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 4 Jan 2023 17:18:10 -0800 Subject: [PATCH] Fix bug associated with orientation data not always getting written This might reflect a deeper issue with the locked_data sometimes being _too_ locked. --- manimlib/mobject/types/vectorized_mobject.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manimlib/mobject/types/vectorized_mobject.py b/manimlib/mobject/types/vectorized_mobject.py index 759e7d0d..fcab57c9 100644 --- a/manimlib/mobject/types/vectorized_mobject.py +++ b/manimlib/mobject/types/vectorized_mobject.py @@ -995,6 +995,9 @@ class VMobject(Mobject): v12s = points[2::3] - points[1::3] curve_orientations = np.sign(cross2d(v01s, v12s)) self.data["orientation"] = np.transpose([curve_orientations.repeat(3)]) + # Read into fill_data so there are no locked data issues later + self.fill_data = resize_array(self.fill_data, len(points)) + self.fill_data["orientation"][:] = self.data["orientation"] concave_parts = curve_orientations < 0