MLP227: always_update_mobjects forces a provably static wait¶
qual reports MLP227 on a wait made dynamic only by a literal
always_update_mobjects = True while the wait's interval provably has
nothing to update: no scene updater, no stop condition, no camera motion
(the scene commits to the plain 2D Scene camera), and no registered
mobject updater of any arity. Every frame then runs the full frame
pipeline — family walk, update pass, re-render — to reproduce an
identical image (DESIGN 3.3, 7.3).
- Default severity:
warning - Minimum confidence:
high— aMaybeflag value (any non-literal write) never fires - Implementation phase:
3 - Fix: none
The static proof deliberately requires no updaters at all, not just
no time-based ones: without the flag, a wait whose family holds only
one-argument updaters freezes and those updaters stop running
(DESIGN 3.3), so suggesting the flag's removal is only visual-preserving
when nothing updates. Unknown-kind objects and intrinsically per-frame
classes (such as TracedPath) also void the proof. Freezing does not
shorten the video — the encoder still writes the full wait duration.
Wrong¶
class Demo(Scene):
def construct(self):
self.always_update_mobjects = True
square = Square()
self.add(square)
self.wait(3) # ~180 identical frames, full pipeline each