Skip to content

MLC118: animation result overlaps a resumed updater write

qual reports MLC118 when a normal animation definitely suspends a live target's active updater and the updater has a fully classified, unconditional write to at least one channel the animation also writes.

Manim suspends the updater in Animation.begin(), completes interpolation at alpha=1, resumes the updater in finish(), and immediately runs Scene.update_mobjects(0) before the play returns. The animation result is therefore followed immediately by another write to the same points, style, or opacity channel.

  • Default severity: info
  • Minimum confidence: medium
  • Implementation phase: 2
  • Fix: none; usually animate the updater's driver (for example a ValueTracker) or make suspend_mobject_updating explicit

Unknown callback effects, conditional writes, branch-only registrations, removed updaters, disjoint write channels, and suspend_mobject_updating=False stay silent.

Risky

square.add_updater(lambda mob: mob.move_to(ORIGIN))
self.add(square)
self.play(square.animate.shift(RIGHT))

Explicit

square.add_updater(lambda mob: mob.move_to(ORIGIN))
self.add(square)
self.play(square.animate.shift(RIGHT), suspend_mobject_updating=False)