Skip to content

Commit ef69e4f

Browse files
committed
Fixed bad slicing when assigning handles in jagged mode in VMobject.change_anchor_mode
1 parent e1603a5 commit ef69e4f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

manim/mobject/types/vectorized_mobject.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,8 +928,10 @@ def change_anchor_mode(self, mode: str):
928928
# thus making the Bézier curves straight lines
929929
starts = submob.get_start_anchors()
930930
ends = submob.get_end_anchors()
931-
for a in self.bezier_alphas[1:-1]:
932-
submob.points[1::nppcc] = interpolate(starts, ends, a)
931+
for i in range(1, nppcc - 1):
932+
submob.points[i::nppcc] = interpolate(
933+
starts, ends, self.bezier_alphas[i]
934+
)
933935

934936
elif mode == "smooth":
935937
# Divide into subpaths and for each subpath compute smooth handles.

0 commit comments

Comments
 (0)