Skip to content

MLC116: later animation confuses a normal Transform target with the live source

qual reports MLC116 for the narrow post-Transform identity pattern where all of the following are proven:

  • a normal Transform(source, target) completed on every path;
  • source is still in the Scene and target is absent;
  • a later non-introducer .animate expression targets that exact target.

Normal Transform mutates source in place. The later play therefore auto-adds target as a second object instead of continuing to animate the already transformed object.

  • Default severity: info
  • Minimum confidence: medium
  • Implementation phase: 2
  • Fix: none; use the source alias when that is the intended identity

ReplacementTransform, a target already present in the Scene, branch-only Transforms, and later animations of the source stay silent.

Wrong

self.add(source)
self.play(Transform(source, target))
self.play(target.animate.shift(RIGHT))
self.add(source)
self.play(Transform(source, target))
self.play(source.animate.shift(RIGHT))