diff --git a/manimlib/animation/creation.py b/manimlib/animation/creation.py index 66716df8..ac73891d 100644 --- a/manimlib/animation/creation.py +++ b/manimlib/animation/creation.py @@ -98,11 +98,7 @@ class DrawBorderThenFill(Animation): self.mobject = vmobject def begin(self) -> None: - # Trigger triangulation calculation - for submob in self.mobject.get_family(): - if not submob._use_winding_fill: - submob.get_triangulation() - + self.mobject.set_animating_status(True) self.outline = self.get_outline() super().begin() self.mobject.match_style(self.outline) diff --git a/manimlib/mobject/types/vectorized_mobject.py b/manimlib/mobject/types/vectorized_mobject.py index 27051f79..a0185041 100644 --- a/manimlib/mobject/types/vectorized_mobject.py +++ b/manimlib/mobject/types/vectorized_mobject.py @@ -1239,6 +1239,15 @@ class VMobject(Mobject): super().apply_points_function(*args, **kwargs) self.refresh_joint_products() + def set_animating_status(self, is_animating: bool, recurse: bool = True): + super().set_animating_status(is_animating, recurse) + if is_animating: + for submob in self.get_family(recurse): + submob.get_joint_products(refresh=True) + if not submob._use_winding_fill: + submob.get_triangulation() + return self + # For shaders def init_shader_data(self, ctx: Context): dtype = self.shader_dtype